replace: Fix includes of unistd.h
authorMartin Schwenke <martin@meltin.net>
Fri, 29 Aug 2014 11:13:47 +0000 (21:13 +1000)
committerVolker Lendecke <vl@samba.org>
Fri, 19 Sep 2014 16:11:11 +0000 (18:11 +0200)
This should always be conditional.  system/passwd.h wants it too so
that uid_t is defined.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
lib/replace/system/filesys.h
lib/replace/system/network.h
lib/replace/system/passwd.h

index b234f10..bd6e6a0 100644 (file)
 
 */
 
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+
 #include <sys/stat.h>
 
 #ifdef HAVE_SYS_PARAM_H
index 273cb71..4a3fd07 100644 (file)
@@ -31,7 +31,9 @@
 #error "AC_LIBREPLACE_NETWORK_CHECKS missing in configure"
 #endif
 
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #include <net/if.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
index f8b9a77..ecc9f60 100644 (file)
 
 */
 
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 #ifdef HAVE_PWD_H
 #include <pwd.h>
 #endif