Index: test/test-functional.c
--- test/test-functional.c.orig
+++ test/test-functional.c
@@ -4,6 +4,8 @@
 
 #include <sys/wait.h>
 
+#include <sys/wait.h> /* WEXITSTATUS */
+
 #include "config.h"
 
 #include "pwtest.h"
