Most code now uses the virProcess / virCommand APIs, so the need for sys/wait.h is quite limited. Removing this include removes the dependency on GNULIB providing a dummy sys/wait.h for Windows. Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> --- src/libvirt.c | 1 - src/lxc/lxc_container.c | 1 - src/network/bridge_driver.c | 1 - src/openvz/openvz_conf.c | 1 - src/openvz/openvz_driver.c | 1 - src/qemu/qemu_capabilities.c | 1 - src/qemu/qemu_conf.c | 1 - src/qemu/qemu_driver.c | 1 - src/remote/remote_daemon.c | 1 - src/rpc/virnetsocket.c | 1 - src/storage/storage_backend_iscsi.c | 1 - src/storage/storage_backend_logical.c | 1 - src/storage/storage_util.c | 1 - src/util/virfdstream.c | 1 - src/util/virfile.c | 1 - src/util/virhook.c | 1 - src/util/viriptables.c | 1 - src/util/virnetdevveth.c | 2 -- src/util/virsysinfo.c | 1 - src/vz/vz_driver.c | 1 - tests/commandtest.c | 4 +++- tests/testutils.c | 1 - 22 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 2d02808a89..a30eaa7590 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -24,7 +24,6 @@ #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> -#include <sys/wait.h> #include <time.h> #include <gio/gnetworking.h> diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index b44cc68e67..46f3e06f14 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -25,7 +25,6 @@ #include <fcntl.h> #include <sys/ioctl.h> #include <sys/mount.h> -#include <sys/wait.h> #include <sys/stat.h> #include <unistd.h> #include <mntent.h> diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index b66135f2d9..8db1040b62 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -30,7 +30,6 @@ #include <fcntl.h> #include <signal.h> #include <pwd.h> -#include <sys/wait.h> #include <sys/ioctl.h> #include <net/if.h> #ifdef HAVE_SYSCTLBYNAME diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c index 1ec42c1d93..a3ae567fdf 100644 --- a/src/openvz/openvz_conf.c +++ b/src/openvz/openvz_conf.c @@ -29,7 +29,6 @@ #include <dirent.h> #include <time.h> #include <sys/stat.h> -#include <sys/wait.h> #include "virerror.h" #include "openvz_conf.h" diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 62644f3129..997b5acdab 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -30,7 +30,6 @@ #include <sys/stat.h> #include <fcntl.h> #include <pwd.h> -#include <sys/wait.h> #include "virerror.h" #include "datatypes.h" diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 5ff232608c..9bb4461793 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -51,7 +51,6 @@ #include <fcntl.h> #include <sys/stat.h> #include <unistd.h> -#include <sys/wait.h> #include <stdarg.h> #include <sys/utsname.h> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index e5051027fc..119965dd80 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -25,7 +25,6 @@ #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> -#include <sys/wait.h> #include "virerror.h" #include "qemu_conf.h" diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 55159365e3..cebedf1fa3 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -30,7 +30,6 @@ #include <sys/stat.h> #include <fcntl.h> #include <signal.h> -#include <sys/wait.h> #include <sys/ioctl.h> #include "qemu_driver.h" diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c index 33697988b6..524ee2cab9 100644 --- a/src/remote/remote_daemon.c +++ b/src/remote/remote_daemon.c @@ -23,7 +23,6 @@ #include <unistd.h> #include <fcntl.h> -#include <sys/wait.h> #include <sys/stat.h> #include <getopt.h> #include <grp.h> diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index e1af68450f..07733cee48 100644 --- a/src/rpc/virnetsocket.c +++ b/src/rpc/virnetsocket.c @@ -23,7 +23,6 @@ #include <sys/stat.h> #include <unistd.h> -#include <sys/wait.h> #include <signal.h> #include <fcntl.h> #ifdef HAVE_IFADDRS_H diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index c02fbb5eaa..45a80b5f2a 100644 --- a/src/storage/storage_backend_iscsi.c +++ b/src/storage/storage_backend_iscsi.c @@ -22,7 +22,6 @@ #include <config.h> #include <dirent.h> -#include <sys/wait.h> #include <fcntl.h> #include <unistd.h> #include <sys/stat.h> diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c index 42dec05ba0..d26ca9c58e 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -21,7 +21,6 @@ #include <config.h> -#include <sys/wait.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index b6ea0a2760..73ec3b6167 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -19,7 +19,6 @@ #include <config.h> #include <sys/types.h> -#include <sys/wait.h> #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> diff --git a/src/util/virfdstream.c b/src/util/virfdstream.c index 05ac63c281..1354d2ee52 100644 --- a/src/util/virfdstream.c +++ b/src/util/virfdstream.c @@ -26,7 +26,6 @@ #include <fcntl.h> #include <unistd.h> #ifndef WIN32 -# include <sys/wait.h> # include <termios.h> #endif diff --git a/src/util/virfile.c b/src/util/virfile.c index 97c82c1161..96778c61bd 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -42,7 +42,6 @@ # include <libutil.h> #endif /* !HAVE_LIBUTIL_H */ #include <sys/stat.h> -#include <sys/wait.h> #if defined(HAVE_SYS_MOUNT_H) # include <sys/mount.h> #endif diff --git a/src/util/virhook.c b/src/util/virhook.c index a687629fc2..5bdacdd79f 100644 --- a/src/util/virhook.c +++ b/src/util/virhook.c @@ -22,7 +22,6 @@ #include <config.h> #include <sys/types.h> -#include <sys/wait.h> #include <sys/stat.h> #include <unistd.h> diff --git a/src/util/viriptables.c b/src/util/viriptables.c index 6b3a025880..e6a1ded8d5 100644 --- a/src/util/viriptables.c +++ b/src/util/viriptables.c @@ -25,7 +25,6 @@ #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> -#include <sys/wait.h> #include "internal.h" #include "viriptables.h" diff --git a/src/util/virnetdevveth.c b/src/util/virnetdevveth.c index 387017f2a8..b9a27951fb 100644 --- a/src/util/virnetdevveth.c +++ b/src/util/virnetdevveth.c @@ -19,8 +19,6 @@ #include <config.h> -#include <sys/wait.h> - #include "virnetdevveth.h" #include "viralloc.h" #include "virlog.h" diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index 4cc4523be0..41f4d1cff9 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -22,7 +22,6 @@ #include <config.h> #include <sys/types.h> -#include <sys/wait.h> #include <sys/stat.h> #include <unistd.h> diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 284c9c1bf6..cfa086caf9 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -30,7 +30,6 @@ #include <sys/stat.h> #include <fcntl.h> #include <pwd.h> -#include <sys/wait.h> #include <sys/time.h> #include <sys/statvfs.h> diff --git a/tests/commandtest.c b/tests/commandtest.c index e19ce62207..7df3ae0171 100644 --- a/tests/commandtest.c +++ b/tests/commandtest.c @@ -23,7 +23,9 @@ #include <unistd.h> #include <signal.h> #include <sys/stat.h> -#include <sys/wait.h> +#ifndef WIN32 +# include <sys/wait.h> +#endif #include <fcntl.h> #include "testutils.h" diff --git a/tests/testutils.c b/tests/testutils.c index 248f9ee8be..579b6fce1a 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -24,7 +24,6 @@ #include <sys/time.h> #include <sys/types.h> #include <sys/stat.h> -#include <sys/wait.h> #include <unistd.h> #include <fcntl.h> #include "testutils.h" -- 2.24.1