From 2f7ba8175e87fcb96ef07a7bf3ef99eb3dc4bc28 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 29 Aug 2014 21:13:47 +1000 Subject: replace: Fix includes of unistd.h This should always be conditional. system/passwd.h wants it too so that uid_t is defined. Signed-off-by: Martin Schwenke Reviewed-by: Volker Lendecke --- lib/replace/system/filesys.h | 3 +++ lib/replace/system/network.h | 6 ++---- lib/replace/system/passwd.h | 4 ++++ 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'lib/replace/system') diff --git a/lib/replace/system/filesys.h b/lib/replace/system/filesys.h index b234f101ef..bd6e6a0dd1 100644 --- a/lib/replace/system/filesys.h +++ b/lib/replace/system/filesys.h @@ -26,7 +26,10 @@ */ +#ifdef HAVE_UNISTD_H #include +#endif + #include #ifdef HAVE_SYS_PARAM_H diff --git a/lib/replace/system/network.h b/lib/replace/system/network.h index 273cb716cf..4a3fd07d8e 100644 --- a/lib/replace/system/network.h +++ b/lib/replace/system/network.h @@ -31,7 +31,9 @@ #error "AC_LIBREPLACE_NETWORK_CHECKS missing in configure" #endif +#ifdef HAVE_UNISTD_H #include +#endif #ifdef HAVE_SYS_SOCKET_H #include @@ -77,10 +79,6 @@ #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif - #ifdef HAVE_SYS_IOCTL_H #include #endif diff --git a/lib/replace/system/passwd.h b/lib/replace/system/passwd.h index f8b9a774b3..ecc9f603d9 100644 --- a/lib/replace/system/passwd.h +++ b/lib/replace/system/passwd.h @@ -27,6 +27,10 @@ */ +#ifdef HAVE_UNISTD_H +#include +#endif + #ifdef HAVE_PWD_H #include #endif -- cgit