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