summaryrefslogtreecommitdiffstats
path: root/package/wvstreams
diff options
context:
space:
mode:
Diffstat (limited to 'package/wvstreams')
-rw-r--r--package/wvstreams/Config.in5
-rw-r--r--package/wvstreams/wvstreams-0004-build-fixes.patch40
-rw-r--r--package/wvstreams/wvstreams-0005-getuid.patch25
-rw-r--r--package/wvstreams/wvstreams.mk6
4 files changed, 73 insertions, 3 deletions
diff --git a/package/wvstreams/Config.in b/package/wvstreams/Config.in
index c39ec33a0..11b8e4472 100644
--- a/package/wvstreams/Config.in
+++ b/package/wvstreams/Config.in
@@ -1,6 +1,7 @@
config BR2_PACKAGE_WVSTREAMS
bool "wvstreams"
depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_LARGEFILE
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_OPENSSL
select BR2_PACKAGE_ZLIB
@@ -9,5 +10,5 @@ config BR2_PACKAGE_WVSTREAMS
http://wvstreams.googlecode.com/
-comment "wvstreams requires a toolchain with C++ support enabled"
- depends on !BR2_INSTALL_LIBSTDCPP
+comment "wvstreams requires a toolchain with C++ and largefile support enabled"
+ depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE
diff --git a/package/wvstreams/wvstreams-0004-build-fixes.patch b/package/wvstreams/wvstreams-0004-build-fixes.patch
new file mode 100644
index 000000000..21792d742
--- /dev/null
+++ b/package/wvstreams/wvstreams-0004-build-fixes.patch
@@ -0,0 +1,40 @@
+Add missing includes for proper build on Linux/glibc
+
+The current wvstreams code doesn't build on Linux/glibc, with error
+about chmod() not being available (for wvunixdgsocket.cc) or umask()
+not being available (for wvatomicfile.cc). Those errors turn out to be
+missing includes. Those includes were in fact already done, but
+conditionally for MacOS. We make them unconditional (it probably
+breaks other platforms, but since Buildroot is Linux only, we don't
+care).
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/ipstreams/wvunixdgsocket.cc
+===================================================================
+--- a/ipstreams/wvunixdgsocket.cc
++++ b/ipstreams/wvunixdgsocket.cc
+@@ -1,8 +1,6 @@
+ #include "wvunixdgsocket.h"
+-#ifdef MACOS
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#endif
+
+ WvUnixDGSocket::WvUnixDGSocket(WvStringParm filename, bool _server, int perms)
+ : socketfile(filename)
+Index: b/streams/wvatomicfile.cc
+===================================================================
+--- a/streams/wvatomicfile.cc
++++ b/streams/wvatomicfile.cc
+@@ -10,10 +10,7 @@
+ #include "wvatomicfile.h"
+ #include "wvfileutils.h"
+ #include "wvstrutils.h"
+-
+-#ifdef MACOS
+ #include <sys/stat.h>
+-#endif
+
+ WvAtomicFile::WvAtomicFile(WvStringParm filename, int flags, mode_t create_mode)
+ : tmp_file(WvString::null)
diff --git a/package/wvstreams/wvstreams-0005-getuid.patch b/package/wvstreams/wvstreams-0005-getuid.patch
new file mode 100644
index 000000000..60150665c
--- /dev/null
+++ b/package/wvstreams/wvstreams-0005-getuid.patch
@@ -0,0 +1,25 @@
+[PATCH] wvuid.cc: getuid needs sys/types.h + unistd.h
+
+Otherwise the build fails with:
+
+utils/wvuid.cc: In function 'wvuid_t wvgetuid()':
+utils/wvuid.cc:63:19: error: 'getuid' was not declared in this scope
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ utils/wvuid.cc | 2 ++
+ 1 file changed, 2 insertions(+)
+
+Index: wvstreams-4.6.1/utils/wvuid.cc
+===================================================================
+--- wvstreams-4.6.1.orig/utils/wvuid.cc
++++ wvstreams-4.6.1/utils/wvuid.cc
+@@ -33,6 +33,8 @@
+
+ #else // not WIN32
+
++#include <unistd.h>
++#include <sys/types.h>
+
+ WvString wv_username_from_uid(wvuid_t uid)
+ {
diff --git a/package/wvstreams/wvstreams.mk b/package/wvstreams/wvstreams.mk
index 341fc095b..837c4495b 100644
--- a/package/wvstreams/wvstreams.mk
+++ b/package/wvstreams/wvstreams.mk
@@ -18,7 +18,11 @@ WVSTREAMS_MAKE = $(MAKE1)
# Needed to work around problem with wvassert.h
WVSTREAMS_CONF_OPT += CPPFLAGS=-DNDEBUG
-WVSTREAMS_CONF_OPT += --with-openssl --with-zlib --without-pam
+WVSTREAMS_CONF_OPT += \
+ --with-openssl \
+ --with-zlib \
+ --without-pam \
+ --disable-warnings
ifeq ($(BR2_PACKAGE_DBUS),y)
WVSTREAMS_DEPENDENCIES += dbus