From 8acaeb730b662cd509699c0bafd0a6aa62596413 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 28 Apr 2010 21:31:16 -0600 Subject: [PATCH] build: use gnulib's sys/wait.h * configure.ac: Drop sys/wait.h check. * src/libvirt.c (includes): Use header unconditionally. * src/remote/remote_driver.c (includes): Likewise. * src/storage/storage_backend.c (includes): Likewise. * src/util/ebtables.c (includes): Likewise. * src/util/hooks.c (includes): Likewise. * src/util/iptables.c (includes): Likewise. * src/util/util.c (includes): Likewise. --- bootstrap.conf | 1 + configure.ac | 2 +- src/libvirt.c | 4 +--- src/remote/remote_driver.c | 5 +---- src/storage/storage_backend.c | 4 +--- src/util/ebtables.c | 7 ++----- src/util/hooks.c | 4 +--- src/util/iptables.c | 7 ++----- src/util/util.c | 4 +--- 9 files changed, 11 insertions(+), 27 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index e85f869c70..baf0bc2012 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -57,6 +57,7 @@ strptime strsep strtok_r sys_stat +sys_wait time_r timegm uname diff --git a/configure.ac b/configure.ac index 18da606730..12646e01c2 100644 --- a/configure.ac +++ b/configure.ac @@ -122,7 +122,7 @@ LIBS=$old_libs dnl Availability of various common headers (non-fatal if missing). AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/syslimits.h \ - sys/wait.h sched.h termios.h sys/poll.h syslog.h mntent.h net/ethernet.h]) + sched.h termios.h sys/poll.h syslog.h mntent.h net/ethernet.h]) dnl Where are the XDR functions? dnl If portablexdr is installed, prefer that. diff --git a/src/libvirt.c b/src/libvirt.c index 028115c450..eb053375ae 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -18,9 +18,7 @@ #include #include #include -#ifdef HAVE_SYS_WAIT_H -# include -#endif +#include #include #include diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index bf53da41ce..72cf2925c7 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -33,6 +33,7 @@ #include #include #include +#include /* Windows socket compatibility functions. */ #include @@ -45,10 +46,6 @@ # include #endif -#ifdef HAVE_SYS_WAIT_H -# include -#endif - #ifdef HAVE_PWD_H # include #endif diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c index be87a81d98..7df61cde1d 100644 --- a/src/storage/storage_backend.c +++ b/src/storage/storage_backend.c @@ -29,9 +29,7 @@ # include #endif #include -#if HAVE_SYS_WAIT_H -# include -#endif +#include #include #include #include diff --git a/src/util/ebtables.c b/src/util/ebtables.c index a6afdf8ce6..e2b96085e6 100644 --- a/src/util/ebtables.c +++ b/src/util/ebtables.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 2009 IBM Corp. * Copyright (C) 2007-2010 Red Hat, Inc. + * Copyright (C) 2009 IBM Corp. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -33,10 +33,7 @@ #include #include #include - -#ifdef HAVE_SYS_WAIT_H -# include -#endif +#include #ifdef HAVE_PATHS_H # include diff --git a/src/util/hooks.c b/src/util/hooks.c index 507029fd3c..dec922315d 100644 --- a/src/util/hooks.c +++ b/src/util/hooks.c @@ -24,9 +24,7 @@ #include #include -#if HAVE_SYS_WAIT_H -# include -#endif +#include #include #include #include diff --git a/src/util/iptables.c b/src/util/iptables.c index facc4daa66..4f95a02a1b 100644 --- a/src/util/iptables.c +++ b/src/util/iptables.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2009 Red Hat, Inc. + * Copyright (C) 2007-2010 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -31,10 +31,7 @@ #include #include #include - -#ifdef HAVE_SYS_WAIT_H -# include -#endif +#include #ifdef HAVE_PATHS_H # include diff --git a/src/util/util.c b/src/util/util.c index bfd37e049d..26ac6baeea 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -37,9 +37,7 @@ #include #include #include -#if HAVE_SYS_WAIT_H -# include -#endif +#include #if HAVE_MMAP # include #endif -- 2.47.2