Include the proper headers to fix warnings like:
libnfs-sync.c:1529:3: warning: implicit declaration of function 'gettimeofday' [-Wimplicit-function-declaration]
libnfs-zdr.c:506:2: warning: implicit declaration of function 'getuid' [-Wimplicit-function-declaration]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
sys/time.h needs to be protected with an ifdef
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
#include <sys/sockio.h>
#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
#include "libnfs-zdr.h"
#include "libnfs.h"
#include "libnfs-raw.h"
* i.e. zdrmem_create() buffers.
* It aims to be compatible with normal rpcgen generated functions.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#ifdef WIN32
#include "win32_compat.h"
#endif
#include "aros_compat.h"
#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#include <unistd.h>
#include "libnfs-zdr.h"
struct opaque_auth _null_auth;
#include <string.h>
#include <assert.h>
#include <errno.h>
+#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
+#include <time.h>
#include <sys/types.h>
#include "libnfs-zdr.h"
#include "libnfs.h"