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