]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: Include sys/wait.h in commandtest.c
authorJán Tomko <jtomko@redhat.com>
Tue, 4 Mar 2014 07:39:56 +0000 (08:39 +0100)
committerJán Tomko <jtomko@redhat.com>
Tue, 4 Mar 2014 07:43:22 +0000 (08:43 +0100)
Commit 631923e used a few macros from sys/wait.h without including
it. On Linux, they were also defined in stdlib.h, but on FreeBSD
the build failed:

../../tests/commandtest.c: In function 'test1':
warning: implicit declaration of function 'WIFEXITED'
warning: nested extern declaration of 'WIFEXITED' [-Wnested-externs]

tests/commandtest.c

index cb78a3c50ad1855c439a9fe68c819d7ed3c6e0e8..c8053ff604f769a84e37e126d57f3de1dbfd024a 100644 (file)
@@ -26,6 +26,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include <sys/stat.h>
+#include <sys/wait.h>
 #include <fcntl.h>
 
 #include "testutils.h"