util/virutil.h bogously included unistd.h. Drop it and replace it by including it directly where needed.
Signed-off-by: Peter Krempa <pkre...@redhat.com> --- src/conf/virnwfilterbindingobj.c | 2 ++ src/libxl/libxl_domain.c | 1 + src/locking/lock_daemon_config.c | 2 ++ src/locking/lock_driver_lockd.c | 2 ++ src/logging/log_daemon_config.c | 2 ++ src/lxc/lxc_conf.c | 2 ++ src/lxc/lxc_fuse.c | 1 + src/network/leaseshelper.c | 1 + src/nwfilter/nwfilter_ebiptables_driver.c | 1 + src/remote/remote_daemon_config.c | 2 ++ src/security/security_dac.c | 1 + src/security/security_manager.c | 1 + src/storage/storage_file_fs.c | 1 + src/util/vircgroupv1.c | 1 + src/util/vircgroupv2.c | 1 + src/util/virnetdev.c | 1 + src/util/virnetdevip.c | 1 + src/util/virnetdevmacvlan.c | 2 ++ src/util/virnetdevvportprofile.c | 2 ++ src/util/virperf.c | 1 + src/util/virpidfile.c | 1 + src/util/virpolkit.c | 1 + src/util/virresctrl.c | 1 + src/util/virutil.h | 1 - tests/eventtest.c | 1 + tests/objecteventtest.c | 2 ++ tests/scsihosttest.c | 1 + tests/vboxsnapshotxmltest.c | 1 + tests/virfiletest.c | 1 + tests/virfilewrapper.c | 1 + tests/virlockspacetest.c | 1 + tests/virnetdaemontest.c | 2 ++ tests/virnetsockettest.c | 1 + tests/virnettlscontexttest.c | 1 + tests/virnettlshelpers.c | 1 + tests/virnettlssessiontest.c | 1 + tests/virscsitest.c | 1 + tests/virstoragetest.c | 1 + 38 files changed, 47 insertions(+), 1 deletion(-) diff --git a/src/conf/virnwfilterbindingobj.c b/src/conf/virnwfilterbindingobj.c index 68afb9c434..56a9022fc5 100644 --- a/src/conf/virnwfilterbindingobj.c +++ b/src/conf/virnwfilterbindingobj.c @@ -20,6 +20,8 @@ #include <config.h> +#include <unistd.h> + #include "viralloc.h" #include "virerror.h" #include "virstring.h" diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 287406d323..935d3d86b9 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -21,6 +21,7 @@ #include <config.h> #include <fcntl.h> +#include <unistd.h> #include "libxl_domain.h" #include "libxl_capabilities.h" diff --git a/src/locking/lock_daemon_config.c b/src/locking/lock_daemon_config.c index 03feeb02a5..9dc3d6e409 100644 --- a/src/locking/lock_daemon_config.c +++ b/src/locking/lock_daemon_config.c @@ -21,6 +21,8 @@ #include <config.h> +#include <unistd.h> + #include "lock_daemon_config.h" #include "virconf.h" #include "viralloc.h" diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c index f6371f3050..335180dafa 100644 --- a/src/locking/lock_driver_lockd.c +++ b/src/locking/lock_driver_lockd.c @@ -21,6 +21,8 @@ #include <config.h> +#include <unistd.h> + #include "lock_driver.h" #include "virconf.h" #include "viralloc.h" diff --git a/src/logging/log_daemon_config.c b/src/logging/log_daemon_config.c index ec6d0686f4..626ef15403 100644 --- a/src/logging/log_daemon_config.c +++ b/src/logging/log_daemon_config.c @@ -21,6 +21,8 @@ #include <config.h> +#include <unistd.h> + #include "log_daemon_config.h" #include "virconf.h" #include "viralloc.h" diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c index 2e4cc4f51a..a6be352b22 100644 --- a/src/lxc/lxc_conf.c +++ b/src/lxc/lxc_conf.c @@ -23,6 +23,8 @@ /* includes */ #include <config.h> +#include "unistd.h" + #include "lxc_conf.h" #include "lxc_domain.h" #include "virerror.h" diff --git a/src/lxc/lxc_fuse.c b/src/lxc/lxc_fuse.c index 4137d1b04f..b647743206 100644 --- a/src/lxc/lxc_fuse.c +++ b/src/lxc/lxc_fuse.c @@ -23,6 +23,7 @@ #include <fcntl.h> #include <sys/mount.h> #include <mntent.h> +#include <unistd.h> #include "lxc_fuse.h" #include "lxc_cgroup.h" diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c index 21119b3fbb..6239da0ea1 100644 --- a/src/network/leaseshelper.c +++ b/src/network/leaseshelper.c @@ -23,6 +23,7 @@ #include <config.h> +#include <unistd.h> #include "virthread.h" #include "virfile.h" diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c b/src/nwfilter/nwfilter_ebiptables_driver.c index 32bbf6d05c..424daeb3c7 100644 --- a/src/nwfilter/nwfilter_ebiptables_driver.c +++ b/src/nwfilter/nwfilter_ebiptables_driver.c @@ -25,6 +25,7 @@ #include <sys/stat.h> #include <fcntl.h> #include <sys/utsname.h> +#include <unistd.h> #include "internal.h" diff --git a/src/remote/remote_daemon_config.c b/src/remote/remote_daemon_config.c index a56aa9065a..59f14bdbdc 100644 --- a/src/remote/remote_daemon_config.c +++ b/src/remote/remote_daemon_config.c @@ -21,6 +21,8 @@ #include <config.h> +#include <unistd.h> + #include "remote_daemon_config.h" #include "virconf.h" #include "viralloc.h" diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 6f8ca8cd54..5718557411 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -22,6 +22,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> +#include <unistd.h> #ifdef __FreeBSD__ # include <sys/sysctl.h> diff --git a/src/security/security_manager.c b/src/security/security_manager.c index 74ab0d0dd3..9bcd8f85ab 100644 --- a/src/security/security_manager.c +++ b/src/security/security_manager.c @@ -22,6 +22,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> +#include <unistd.h> #include "security_driver.h" #include "security_stack.h" diff --git a/src/storage/storage_file_fs.c b/src/storage/storage_file_fs.c index 8817970f44..1570170d0e 100644 --- a/src/storage/storage_file_fs.c +++ b/src/storage/storage_file_fs.c @@ -23,6 +23,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> +#include <unistd.h> #include "virerror.h" #include "storage_file_fs.h" diff --git a/src/util/vircgroupv1.c b/src/util/vircgroupv1.c index 6224072db0..7482b96a27 100644 --- a/src/util/vircgroupv1.c +++ b/src/util/vircgroupv1.c @@ -21,6 +21,7 @@ #include <config.h> #ifdef __linux__ +# include <unistd.h> # include <mntent.h> # include <sys/stat.h> # include <sys/mount.h> diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c index 940ee58528..3264bff014 100644 --- a/src/util/vircgroupv2.c +++ b/src/util/vircgroupv2.c @@ -20,6 +20,7 @@ #include <config.h> #ifdef __linux__ +# include <unistd.h> # include <mntent.h> # include <sys/mount.h> #endif /* __linux__ */ diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 5c0e9723b9..8e098b3634 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -35,6 +35,7 @@ #include <sys/ioctl.h> #include <net/if.h> #include <fcntl.h> +#include <unistd.h> #ifdef __linux__ # include <linux/sockios.h> diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index e2009fd829..7fc500007f 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -36,6 +36,7 @@ #include <sys/ioctl.h> #include <net/if.h> #include <fcntl.h> +#include <unistd.h> #ifdef __linux__ # include <linux/sockios.h> diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c index c80a3a381f..e916ba0a0a 100644 --- a/src/util/virnetdevmacvlan.c +++ b/src/util/virnetdevmacvlan.c @@ -24,6 +24,8 @@ #include <config.h> +#include <unistd.h> + #include "virnetdevmacvlan.h" #include "virmacaddr.h" #include "virerror.h" diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprofile.c index fb05190c02..b30204fe7f 100644 --- a/src/util/virnetdevvportprofile.c +++ b/src/util/virnetdevvportprofile.c @@ -18,6 +18,8 @@ #include <config.h> +#include <unistd.h> + #include "virnetdevvportprofile.h" #include "virerror.h" #include "viralloc.h" diff --git a/src/util/virperf.c b/src/util/virperf.c index 6ecfc29cb2..9bde5c1246 100644 --- a/src/util/virperf.c +++ b/src/util/virperf.c @@ -17,6 +17,7 @@ */ #include <config.h> +#include <unistd.h> #include <sys/ioctl.h> #if defined HAVE_SYS_SYSCALL_H # include <sys/syscall.h> diff --git a/src/util/virpidfile.c b/src/util/virpidfile.c index 999bccbee4..a6ee6e1f4b 100644 --- a/src/util/virpidfile.c +++ b/src/util/virpidfile.c @@ -26,6 +26,7 @@ #include <fcntl.h> #include <signal.h> #include <sys/stat.h> +#include <unistd.h> #include "virpidfile.h" #include "virfile.h" diff --git a/src/util/virpolkit.c b/src/util/virpolkit.c index 198439cea2..5c94ae346b 100644 --- a/src/util/virpolkit.c +++ b/src/util/virpolkit.c @@ -21,6 +21,7 @@ #include <config.h> #include <poll.h> +#include <unistd.h> #include "virpolkit.h" #include "virerror.h" diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 9e477fc064..e495233110 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -22,6 +22,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> +#include <unistd.h> #define LIBVIRT_VIRRESCTRLPRIV_H_ALLOW #include "virresctrlpriv.h" diff --git a/src/util/virutil.h b/src/util/virutil.h index 67edf34d55..52a05e7ed6 100644 --- a/src/util/virutil.h +++ b/src/util/virutil.h @@ -24,7 +24,6 @@ # define LIBVIRT_VIRUTIL_H # include "internal.h" -# include <unistd.h> # include <sys/types.h> # ifndef MIN diff --git a/tests/eventtest.c b/tests/eventtest.c index df7570bac6..37166253cc 100644 --- a/tests/eventtest.c +++ b/tests/eventtest.c @@ -22,6 +22,7 @@ #include <signal.h> #include <time.h> +#include <unistd.h> #if HAVE_MACH_CLOCK_ROUTINES # include <mach/clock.h> diff --git a/tests/objecteventtest.c b/tests/objecteventtest.c index 9ba082d353..b53763bc1d 100644 --- a/tests/objecteventtest.c +++ b/tests/objecteventtest.c @@ -19,6 +19,8 @@ #include <config.h> +#include <unistd.h> + #include "testutils.h" #include "virerror.h" diff --git a/tests/scsihosttest.c b/tests/scsihosttest.c index 6989e4fc4a..01cd77462b 100644 --- a/tests/scsihosttest.c +++ b/tests/scsihosttest.c @@ -25,6 +25,7 @@ # include <fcntl.h> # include <sys/stat.h> +# include <unistd.h> # include "virstring.h" # include "virerror.h" # include "virlog.h" diff --git a/tests/vboxsnapshotxmltest.c b/tests/vboxsnapshotxmltest.c index c70d7ab100..2f815a2bca 100644 --- a/tests/vboxsnapshotxmltest.c +++ b/tests/vboxsnapshotxmltest.c @@ -5,6 +5,7 @@ #ifdef WITH_VBOX # include <regex.h> +# include <unistd.h> # include "vbox/vbox_snapshot_conf.h" # define VIR_FROM_THIS VIR_FROM_NONE diff --git a/tests/virfiletest.c b/tests/virfiletest.c index e2bd4953ed..6e4805b42d 100644 --- a/tests/virfiletest.c +++ b/tests/virfiletest.c @@ -19,6 +19,7 @@ #include <config.h> #include <fcntl.h> +#include <unistd.h> #include "testutils.h" #include "virfile.h" diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c index 88441331ce..52d65800b3 100644 --- a/tests/virfilewrapper.c +++ b/tests/virfilewrapper.c @@ -21,6 +21,7 @@ #ifndef WIN32 # include <fcntl.h> +# include <unistd.h> # include "viralloc.h" # include "virfile.h" diff --git a/tests/virlockspacetest.c b/tests/virlockspacetest.c index 991e587db6..4dd485bc0e 100644 --- a/tests/virlockspacetest.c +++ b/tests/virlockspacetest.c @@ -20,6 +20,7 @@ #include <signal.h> #include <sys/stat.h> +#include <unistd.h> #include "testutils.h" #include "virutil.h" diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c index 3e9b007d9b..d7b9db6641 100644 --- a/tests/virnetdaemontest.c +++ b/tests/virnetdaemontest.c @@ -18,6 +18,8 @@ #include <config.h> +#include <unistd.h> + #include "testutils.h" #include "virerror.h" #include "rpc/virnetdaemon.h" diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c index 9c14989287..a7990ee5f3 100644 --- a/tests/virnetsockettest.c +++ b/tests/virnetsockettest.c @@ -23,6 +23,7 @@ # include <ifaddrs.h> #endif #include <netdb.h> +#include <unistd.h> #include "testutils.h" #include "virutil.h" diff --git a/tests/virnettlscontexttest.c b/tests/virnettlscontexttest.c index 07910c2749..b94275b943 100644 --- a/tests/virnettlscontexttest.c +++ b/tests/virnettlscontexttest.c @@ -20,6 +20,7 @@ #include <fcntl.h> #include <sys/socket.h> +#include <unistd.h> #include "testutils.h" #include "virnettlshelpers.h" diff --git a/tests/virnettlshelpers.c b/tests/virnettlshelpers.c index a6aacf4cc3..dfb747b45d 100644 --- a/tests/virnettlshelpers.c +++ b/tests/virnettlshelpers.c @@ -20,6 +20,7 @@ #include <fcntl.h> #include <sys/socket.h> +#include <unistd.h> #include "virnettlshelpers.h" #include "viralloc.h" diff --git a/tests/virnettlssessiontest.c b/tests/virnettlssessiontest.c index 41abbe7eaf..153c8929ed 100644 --- a/tests/virnettlssessiontest.c +++ b/tests/virnettlssessiontest.c @@ -20,6 +20,7 @@ #include <fcntl.h> #include <sys/socket.h> +#include <unistd.h> #include "testutils.h" #include "virnettlshelpers.h" diff --git a/tests/virscsitest.c b/tests/virscsitest.c index be3ef6234e..75c7be5822 100644 --- a/tests/virscsitest.c +++ b/tests/virscsitest.c @@ -19,6 +19,7 @@ #include <config.h> +#include <unistd.h> #include "virscsi.h" #include "testutils.h" diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 4f23511240..d20559a636 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -18,6 +18,7 @@ #include <config.h> +#include <unistd.h> #include "testutils.h" #include "vircommand.h" -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list