]> xenbits.xensource.com Git - libvirt.git/commitdiff
Include unistd.h directly by files using it
authorPeter Krempa <pkrempa@redhat.com>
Mon, 1 Apr 2019 12:47:18 +0000 (14:47 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 10 Apr 2019 07:12:04 +0000 (09:12 +0200)
util/virutil.h bogously included unistd.h. Drop it and replace it by
including it directly where needed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
39 files changed:
src/conf/virnwfilterbindingobj.c
src/libxl/libxl_domain.c
src/locking/lock_daemon_config.c
src/locking/lock_driver_lockd.c
src/logging/log_daemon_config.c
src/lxc/lxc_conf.c
src/lxc/lxc_fuse.c
src/network/leaseshelper.c
src/nwfilter/nwfilter_ebiptables_driver.c
src/qemu/qemu_domain.c
src/remote/remote_daemon_config.c
src/security/security_dac.c
src/security/security_manager.c
src/storage/storage_file_fs.c
src/util/vircgroupv1.c
src/util/vircgroupv2.c
src/util/virnetdev.c
src/util/virnetdevip.c
src/util/virnetdevmacvlan.c
src/util/virnetdevvportprofile.c
src/util/virperf.c
src/util/virpidfile.c
src/util/virpolkit.c
src/util/virresctrl.c
src/util/virutil.h
tests/eventtest.c
tests/objecteventtest.c
tests/scsihosttest.c
tests/vboxsnapshotxmltest.c
tests/virfiletest.c
tests/virfilewrapper.c
tests/virlockspacetest.c
tests/virnetdaemontest.c
tests/virnetsockettest.c
tests/virnettlscontexttest.c
tests/virnettlshelpers.c
tests/virnettlssessiontest.c
tests/virscsitest.c
tests/virstoragetest.c

index 68afb9c4340da82664ab4fedc6c552165456fff3..56a9022fc5add9d3259057d660bd86b9bc91f350 100644 (file)
@@ -20,6 +20,8 @@
 
 #include <config.h>
 
+#include <unistd.h>
+
 #include "viralloc.h"
 #include "virerror.h"
 #include "virstring.h"
index 287406d323bdb7fc251a24f73bc42fe0249d8ac9..935d3d86b90bf9349c807b34494e278412954bb2 100644 (file)
@@ -21,6 +21,7 @@
 #include <config.h>
 
 #include <fcntl.h>
+#include <unistd.h>
 
 #include "libxl_domain.h"
 #include "libxl_capabilities.h"
index 03feeb02a5fe11f07ea396457754e8bb9fc33acf..9dc3d6e40924f558ca2c9c429a534905196f29cd 100644 (file)
@@ -21,6 +21,8 @@
 
 #include <config.h>
 
+#include <unistd.h>
+
 #include "lock_daemon_config.h"
 #include "virconf.h"
 #include "viralloc.h"
index f6371f30503b9d2a3154ebd9e071e8a2fa09aaa2..335180dafa3da257ad0911290ea83a5c39defca6 100644 (file)
@@ -21,6 +21,8 @@
 
 #include <config.h>
 
+#include <unistd.h>
+
 #include "lock_driver.h"
 #include "virconf.h"
 #include "viralloc.h"
index ec6d0686f494439e790e6e7d3b389e8f5a87e9c7..626ef1540318f1936987a4f59b6320fdd9e56798 100644 (file)
@@ -21,6 +21,8 @@
 
 #include <config.h>
 
+#include <unistd.h>
+
 #include "log_daemon_config.h"
 #include "virconf.h"
 #include "viralloc.h"
index 2e4cc4f51a4a76efe269a709810e5e30be77f1d1..a6be352b22ad19b790537ce5f17dfe83c1f3d750 100644 (file)
@@ -23,6 +23,8 @@
 /* includes */
 #include <config.h>
 
+#include "unistd.h"
+
 #include "lxc_conf.h"
 #include "lxc_domain.h"
 #include "virerror.h"
index 4137d1b04fa5a4cc5ca21af4b842ed15e289c394..b64774320653dc7d8bb334f6a8b34b6e18c3bf26 100644 (file)
@@ -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"
index 4c23a55326909435a45a4db0d0e5de902f3e5802..af71e324998ac4ec0247b832bd97164e5a2ca17a 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <config.h>
 
+#include <unistd.h>
 
 #include "virthread.h"
 #include "virfile.h"
index 32bbf6d05c402550174208ec756e070a2b1199c4..424daeb3c722c35f9d67716c562ce52e297d17d7 100644 (file)
@@ -25,6 +25,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <sys/utsname.h>
+#include <unistd.h>
 
 #include "internal.h"
 
index f0bf1aa4fe380a175bf624e2361a2a145b4344db..58029ab20c49cf395a1a0db67d833723517ef206 100644 (file)
@@ -64,6 +64,7 @@
 #endif
 #include <sys/time.h>
 #include <fcntl.h>
+#include <unistd.h>
 #if defined(HAVE_SYS_MOUNT_H)
 # include <sys/mount.h>
 #endif
index a56aa9065afd92ff1048c1c369ca593dcc1ea196..59f14bdbdccfcbccf1ddb32dfeaaa643af6941dc 100644 (file)
@@ -21,6 +21,8 @@
 
 #include <config.h>
 
+#include <unistd.h>
+
 #include "remote_daemon_config.h"
 #include "virconf.h"
 #include "viralloc.h"
index 6f8ca8cd54b0fb1cbaaf10eb118c811094d312b8..5718557411af1965e1ff21aa2ad3be4f0e437f3a 100644 (file)
@@ -22,6 +22,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <unistd.h>
 
 #ifdef  __FreeBSD__
 # include <sys/sysctl.h>
index 74ab0d0dd3bce1e5268fd5cb204c1f8903d423e3..9bcd8f85abb5dcd1301de6e141b022d022c94a60 100644 (file)
@@ -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"
index 8817970f44ea0e2498291494bf52582534964617..1570170d0e233ff470dd4e13afbb25e9932c35c7 100644 (file)
@@ -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"
index 6224072db0f9231f95231c5a040c66b835d8a29a..7482b96a27769c178889b0bef80fabce423c713b 100644 (file)
@@ -21,6 +21,7 @@
 #include <config.h>
 
 #ifdef __linux__
+# include <unistd.h>
 # include <mntent.h>
 # include <sys/stat.h>
 # include <sys/mount.h>
index 940ee58528cef2ebaa7d4b16fb1610a1686ee960..3264bff0143bf5ab9ffab336a27c962932e21d97 100644 (file)
@@ -20,6 +20,7 @@
 #include <config.h>
 
 #ifdef __linux__
+# include <unistd.h>
 # include <mntent.h>
 # include <sys/mount.h>
 #endif /* __linux__ */
index 5c0e9723b915a350ae70d6cb6f967bc2c81acc8c..8e098b3634db8e6291ca5ea87dfb5f41a709177b 100644 (file)
@@ -35,6 +35,7 @@
 #include <sys/ioctl.h>
 #include <net/if.h>
 #include <fcntl.h>
+#include <unistd.h>
 
 #ifdef __linux__
 # include <linux/sockios.h>
index e2009fd829e41a35ce33edd079d07176848b9fe7..7fc500007f950ff3da17855f9321c33af69d9dcd 100644 (file)
@@ -36,6 +36,7 @@
 #include <sys/ioctl.h>
 #include <net/if.h>
 #include <fcntl.h>
+#include <unistd.h>
 
 #ifdef __linux__
 # include <linux/sockios.h>
index c80a3a381f62e96ce442b685d02f264ab43c51f0..e916ba0a0a02c3a176587d456b51aade9d90fa10 100644 (file)
@@ -24,6 +24,8 @@
 
 #include <config.h>
 
+#include <unistd.h>
+
 #include "virnetdevmacvlan.h"
 #include "virmacaddr.h"
 #include "virerror.h"
index fb05190c028de24b0be327b7477a718137582b21..b30204fe7fca41f6ad9eb3f7f92af44be573d0ec 100644 (file)
@@ -18,6 +18,8 @@
 
 #include <config.h>
 
+#include <unistd.h>
+
 #include "virnetdevvportprofile.h"
 #include "virerror.h"
 #include "viralloc.h"
index 6ecfc29cb2a8503698c855070606d784c83be187..9bde5c124653fda3455dbe01dcbbc8aa899318b3 100644 (file)
@@ -17,6 +17,7 @@
  */
 #include <config.h>
 
+#include <unistd.h>
 #include <sys/ioctl.h>
 #if defined HAVE_SYS_SYSCALL_H
 # include <sys/syscall.h>
index 999bccbee42b5f7db91f8f08a65f3714a239b955..a6ee6e1f4b1f8de1b0bcfceeb5f15650a38990e8 100644 (file)
@@ -26,6 +26,7 @@
 #include <fcntl.h>
 #include <signal.h>
 #include <sys/stat.h>
+#include <unistd.h>
 
 #include "virpidfile.h"
 #include "virfile.h"
index 198439cea2915c23874436a7f8b6458a11780346..5c94ae346b3107a7275647160fb11a1cff78bf52 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <config.h>
 #include <poll.h>
+#include <unistd.h>
 
 #include "virpolkit.h"
 #include "virerror.h"
index 9e477fc064ed4f1525baa2a6f630967e378e966d..e4952331100d55ae986c641611a9ba3f0f49a86b 100644 (file)
@@ -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"
index ded9b039e50366476d8a5366f4aab5018af3c754..477d70554b6e39d05660ec6f7aa0e6a751d176df 100644 (file)
@@ -24,7 +24,6 @@
 # define LIBVIRT_VIRUTIL_H
 
 # include "internal.h"
-# include <unistd.h>
 # include <sys/types.h>
 
 # ifndef MIN
index df7570bac6ad0571f34981b1402b795702f20c49..37166253cc9a9a3a43f7b67851c7124001cf5efe 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <signal.h>
 #include <time.h>
+#include <unistd.h>
 
 #if HAVE_MACH_CLOCK_ROUTINES
 # include <mach/clock.h>
index 9ba082d3538e47b1e69effbd3ef3be622881501b..b53763bc1dc53a4d2e9d8122cbe6eb3342724b35 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <config.h>
 
+#include <unistd.h>
+
 #include "testutils.h"
 
 #include "virerror.h"
index 6989e4fc4a264b966c408b39b655b56b26d3bf44..01cd77462bdfa74361c67a0f8d999ca4b79410f7 100644 (file)
@@ -25,6 +25,7 @@
 
 # include <fcntl.h>
 # include <sys/stat.h>
+# include <unistd.h>
 # include "virstring.h"
 # include "virerror.h"
 # include "virlog.h"
index c70d7ab10016d02a3dcb03746b1ba2a94e86e268..2f815a2bca6ff76d003e8a7bf57fe9d3ace98436 100644 (file)
@@ -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
index e2bd4953ede8c2c733504b2050d0957d71d3a012..6e4805b42da33eda064977f992c9b8a461993848 100644 (file)
@@ -19,6 +19,7 @@
 #include <config.h>
 
 #include <fcntl.h>
+#include <unistd.h>
 
 #include "testutils.h"
 #include "virfile.h"
index 067cb30657e377d5d1f7cf423cc18d0242b0cad3..f4d077d608077e55e327457052310e8a744cca6e 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef WIN32
 
 # include <fcntl.h>
+# include <unistd.h>
 
 # include "viralloc.h"
 # include "virfile.h"
index 991e587db648d412da61fd18112905a94e78630e..4dd485bc0ebfd0194eb120b4e2abe114a860fb8f 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <signal.h>
 #include <sys/stat.h>
+#include <unistd.h>
 
 #include "testutils.h"
 #include "virutil.h"
index 3e9b007d9bf441c3e1b9e6c4dbaa67501a409404..d7b9db6641c042b2b7f1abd0d21093cf078e1707 100644 (file)
@@ -18,6 +18,8 @@
 
 #include <config.h>
 
+#include <unistd.h>
+
 #include "testutils.h"
 #include "virerror.h"
 #include "rpc/virnetdaemon.h"
index 9c149892875310a701a24377073e8c578b1f6b6a..a7990ee5f32609773206b63a5e82940372e5cef2 100644 (file)
@@ -23,6 +23,7 @@
 # include <ifaddrs.h>
 #endif
 #include <netdb.h>
+#include <unistd.h>
 
 #include "testutils.h"
 #include "virutil.h"
index 07910c27497e20d3085777ee9721262d8d877289..b94275b9439a2f752e5f8f6bc63ad297a80f68eb 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <fcntl.h>
 #include <sys/socket.h>
+#include <unistd.h>
 
 #include "testutils.h"
 #include "virnettlshelpers.h"
index a6aacf4cc33734ffc2c03c1ca09bea156448b658..dfb747b45dd1c35cd06fc48e25a55fc0d5b6ccaf 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <fcntl.h>
 #include <sys/socket.h>
+#include <unistd.h>
 
 #include "virnettlshelpers.h"
 #include "viralloc.h"
index 41abbe7eaf5a050157bea8f13c2587853cabb726..153c8929ed99b38e0f0eaae69e2c1c46e99d4931 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <fcntl.h>
 #include <sys/socket.h>
+#include <unistd.h>
 
 #include "testutils.h"
 #include "virnettlshelpers.h"
index be3ef6234e9ab4ad694d0815e56a6bf0949c8d26..75c7be5822cfa9939306d76bd382ad15a62eafb9 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <config.h>
 
+#include <unistd.h>
 
 #include "virscsi.h"
 #include "testutils.h"
index 4f235112400347e00f3d2708174a3771a14b3269..d20559a6369ac49bf68e8e872ade35e5b8c2f456 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <config.h>
 
+#include <unistd.h>
 
 #include "testutils.h"
 #include "vircommand.h"