summaryrefslogtreecommitdiffstats
path: root/lib/replace/system
diff options
context:
space:
mode:
Diffstat (limited to 'lib/replace/system')
-rw-r--r--lib/replace/system/filesys.h3
-rw-r--r--lib/replace/system/network.h6
-rw-r--r--lib/replace/system/passwd.h4
3 files changed, 9 insertions, 4 deletions
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 <unistd.h>
+#endif
+
#include <sys/stat.h>
#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 <unistd.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
@@ -77,10 +79,6 @@
#include <net/if.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#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 <unistd.h>
+#endif
+
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif