0001-Fix-include-sys-time.h.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From 9df082012cba1dc32d83e5e8b0bdc0892f250058 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
  3. Date: Mon, 5 Nov 2018 00:43:07 +0100
  4. Subject: [PATCH] Fix include sys/time.h
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. POSIX says `struct timeval` is defined if <sys/time.h> is included.
  9. Instead of the mess that is currently done based on the system on which
  10. the stuff is being compiled, include it unconditionally.
  11. Upstream: https://github.com/sahlberg/libnfs/issues/272
  12. Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
  13. [Fabrice: update for 5.0.2]
  14. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  15. ---
  16. include/nfsc/libnfs.h | 5 -----
  17. 1 file changed, 5 deletions(-)
  18. diff --git a/include/nfsc/libnfs.h b/include/nfsc/libnfs.h
  19. index 09dcf1c..b6db58c 100755
  20. --- a/include/nfsc/libnfs.h
  21. +++ b/include/nfsc/libnfs.h
  22. @@ -24,12 +24,7 @@
  23. #define _LIBNFS_H_
  24. #include <stdint.h>
  25. -#if defined(__ANDROID__) || defined(AROS) || defined(__PPU__) \
  26. - || ( defined(__APPLE__) && defined(__MACH__) ) || defined(__FreeBSD__) || defined(__OpenBSD__)
  27. #include <sys/time.h>
  28. -#else
  29. -#include <time.h>
  30. -#endif
  31. #ifdef __cplusplus
  32. extern "C" {
  33. --
  34. 2.19.1