From: Mike Frysinger Date: Tue, 4 Dec 2012 03:30:04 +0000 (-0500) Subject: fix implicit decl warnings X-Git-Tag: upstream/1.9.6^2~13 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=10a1a78115069098419d32a042d99a56f62fb642;p=deb_libnfs.git fix implicit decl warnings 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 sys/time.h needs to be protected with an ifdef Signed-off-by: Ronnie Sahlberg --- diff --git a/lib/libnfs-sync.c b/lib/libnfs-sync.c index 0fc1094..2851a91 100644 --- a/lib/libnfs-sync.c +++ b/lib/libnfs-sync.c @@ -86,6 +86,10 @@ #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif + #include "libnfs-zdr.h" #include "libnfs.h" #include "libnfs-raw.h" diff --git a/lib/libnfs-zdr.c b/lib/libnfs-zdr.c index c32f661..b6b3ed9 100644 --- a/lib/libnfs-zdr.c +++ b/lib/libnfs-zdr.c @@ -20,6 +20,10 @@ * 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 @@ -28,9 +32,14 @@ #include "aros_compat.h" #endif +#ifdef HAVE_ARPA_INET_H +#include +#endif + #include #include #include +#include #include "libnfs-zdr.h" struct opaque_auth _null_auth; diff --git a/lib/libnfs.c b/lib/libnfs.c index 87106bb..f87752c 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -73,6 +73,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/socket.c b/lib/socket.c index 3f7f89f..f8db957 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -68,6 +68,7 @@ #include #include #include +#include #include #include "libnfs-zdr.h" #include "libnfs.h"