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

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. Reported upstream:
  12. https://github.com/sahlberg/libnfs/issues/272
  13. Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
  14. ---
  15. include/nfsc/libnfs.h | 5 -----
  16. 1 file changed, 5 deletions(-)
  17. diff --git a/include/nfsc/libnfs.h b/include/nfsc/libnfs.h
  18. index 09dcf1c..b6db58c 100755
  19. --- a/include/nfsc/libnfs.h
  20. +++ b/include/nfsc/libnfs.h
  21. @@ -24,12 +24,7 @@
  22. #define _LIBNFS_H_
  23. #include <stdint.h>
  24. -#if defined(__ANDROID__) || defined(AROS) \
  25. - || ( defined(__APPLE__) && defined(__MACH__) )
  26. #include <sys/time.h>
  27. -#else
  28. -#include <time.h>
  29. -#endif
  30. #ifdef __cplusplus
  31. extern "C" {
  32. --
  33. 2.19.1