summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/replace/config.m41
-rw-r--r--source4/lib/replace/replace.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/source4/lib/replace/config.m4 b/source4/lib/replace/config.m4
index 994cd24866..53eda9e8ed 100644
--- a/source4/lib/replace/config.m4
+++ b/source4/lib/replace/config.m4
@@ -51,6 +51,7 @@ AC_TRY_COMPILE([
AC_CHECK_HEADERS(sys/syslog.h syslog.h)
AC_CHECK_HEADERS(sys/time.h time.h)
+AC_CHECK_HEADERS(sys/socket.h netinet/in.h)
AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror)
AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
AC_CHECK_FUNCS(waitpid strlcpy strlcat innetgr initgroups memmove strdup)
diff --git a/source4/lib/replace/replace.c b/source4/lib/replace/replace.c
index b1154fb7a2..b9c106d582 100644
--- a/source4/lib/replace/replace.c
+++ b/source4/lib/replace/replace.c
@@ -31,6 +31,14 @@
#include <sys/types.h>
#include <fcntl.h>
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
void replace_dummy(void);
void replace_dummy(void) {}