diff --git a/src/lpc_signal.c b/src/lpc_signal.c
index 9f698c2ab0479752d523b53dc5aa5ce547b7a889..fdbb2fea86a513166c3c8f706c35af27b5fab4cf 100644
--- a/src/lpc_signal.c
+++ b/src/lpc_signal.c
@@ -11,6 +11,7 @@
 #include "macros.h"
 #include "backend.h"
 #include <signal.h>
+#include <sys/wait.h>
 
 #ifdef NSIG
 #define MAX_SIGNALS NSIG
diff --git a/src/machine.h.in b/src/machine.h.in
index 975dc6bda9626e289f1c5520ed295ae23ee0c0cc..dd9b5214208713c41f798893e487183d537d7e3a 100644
--- a/src/machine.h.in
+++ b/src/machine.h.in
@@ -217,6 +217,12 @@
 /* Define if you have getrlimit */
 #undef HAVE_GETRLIMIT
 
+/* Define if you have waitpid */
+#undef HAVE_WAITPID
+
+/* Define if you have wait4 */
+#undef HAVE_WAIT4
+
 /* Define if you have the m library (-lm).  */
 #undef HAVE_LIBM
 
diff --git a/src/modules/files/configure b/src/modules/files/configure
index b502b2673f4d35836f3958a5f0fb2c16764a1d31..9ee831f2ae1d0060e2e203ef325eeeaa7efc0fc6 100755
--- a/src/modules/files/configure
+++ b/src/modules/files/configure
@@ -743,7 +743,7 @@ else
 fi
 
 
-for ac_func in socketpair waitpid wait4
+for ac_func in socketpair
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
 if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
diff --git a/src/modules/files/configure.in b/src/modules/files/configure.in
index e7464f5ad2c7c4130e9982cef5162dbcf509ba11..138f65ad1ee29eaa71a2daa8d92d31f067b66504 100644
--- a/src/modules/files/configure.in
+++ b/src/modules/files/configure.in
@@ -10,7 +10,7 @@ AC_HAVE_HEADERS(arpa/inet.h sys/socketvar.h netinet/in.h \
 AC_HEADER_DIRENT
 AC_CHECK_LIB(socket, socket)
 
-AC_HAVE_FUNCS(socketpair waitpid wait4)
+AC_HAVE_FUNCS(socketpair)
 
 AC_MSG_CHECKING(size of socket buffers)
 AC_CACHE_VAL(lpc_cv_socket_buffer_max,
diff --git a/src/modules/files/file.c b/src/modules/files/file.c
index 137482f4aaf1142e8e696a2962713ed50521cfd8..3cb08d658723c05a69813f176d7ba2eaf898b45d 100644
--- a/src/modules/files/file.c
+++ b/src/modules/files/file.c
@@ -27,7 +27,6 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <signal.h>
-#include <sys/wait.h>
 #include <sys/socket.h>
 
 #ifdef HAVE_SYS_STREAM_H
diff --git a/src/modules/files/file_machine.h.in b/src/modules/files/file_machine.h.in
index fe7b9653ee769b6447a1c997c5cfcd9e118bb0ae..d091c641f26f9bdc076c76f6c783255ce79f98c9 100644
--- a/src/modules/files/file_machine.h.in
+++ b/src/modules/files/file_machine.h.in
@@ -34,11 +34,5 @@
 /* Do we have socketpair() ? */
 #undef HAVE_SOCKETPAIR
 
-/* Define if you have waitpid */
-#undef HAVE_WAITPID
-
-/* Define if you have wait4 */
-#undef HAVE_WAIT4
-
 #endif