summaryrefslogtreecommitdiffstats
path: root/package/wvstreams/wvstreams-0004-build-fixes.patch
blob: 21792d7422f6dca8cd622a8cdf184c339533df35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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)