0004-build-fixes.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. Add missing includes for proper build on Linux/glibc
  2. The current wvstreams code doesn't build on Linux/glibc, with error
  3. about chmod() not being available (for wvunixdgsocket.cc) or umask()
  4. not being available (for wvatomicfile.cc). Those errors turn out to be
  5. missing includes. Those includes were in fact already done, but
  6. conditionally for MacOS. We make them unconditional (it probably
  7. breaks other platforms, but since Buildroot is Linux only, we don't
  8. care).
  9. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  10. Index: b/ipstreams/wvunixdgsocket.cc
  11. ===================================================================
  12. --- a/ipstreams/wvunixdgsocket.cc
  13. +++ b/ipstreams/wvunixdgsocket.cc
  14. @@ -1,8 +1,6 @@
  15. #include "wvunixdgsocket.h"
  16. -#ifdef MACOS
  17. #include <sys/types.h>
  18. #include <sys/stat.h>
  19. -#endif
  20. WvUnixDGSocket::WvUnixDGSocket(WvStringParm filename, bool _server, int perms)
  21. : socketfile(filename)
  22. Index: b/streams/wvatomicfile.cc
  23. ===================================================================
  24. --- a/streams/wvatomicfile.cc
  25. +++ b/streams/wvatomicfile.cc
  26. @@ -10,10 +10,7 @@
  27. #include "wvatomicfile.h"
  28. #include "wvfileutils.h"
  29. #include "wvstrutils.h"
  30. -
  31. -#ifdef MACOS
  32. #include <sys/stat.h>
  33. -#endif
  34. WvAtomicFile::WvAtomicFile(WvStringParm filename, int flags, mode_t create_mode)
  35. : tmp_file(WvString::null)