[PATCH] Revert "Include unistd.h directly by files using it"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This reverts commit a5e16020907e91bca1b0ab6c4ee5dbbdcccf6a54.

Getting rid of unistd.h from our headers will require more work than
just fixing the broken mingw build. Revert it until I have a more
complete proposal.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---

Pushed under the build-breaker rule.

 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/qemu/qemu_domain.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 -
 39 files changed, 1 insertion(+), 48 deletions(-)

diff --git a/src/conf/virnwfilterbindingobj.c b/src/conf/virnwfilterbindingobj.c
index 56a9022fc5..68afb9c434 100644
--- a/src/conf/virnwfilterbindingobj.c
+++ b/src/conf/virnwfilterbindingobj.c
@@ -20,8 +20,6 @@

 #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 935d3d86b9..287406d323 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -21,7 +21,6 @@
 #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 9dc3d6e409..03feeb02a5 100644
--- a/src/locking/lock_daemon_config.c
+++ b/src/locking/lock_daemon_config.c
@@ -21,8 +21,6 @@

 #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 335180dafa..f6371f3050 100644
--- a/src/locking/lock_driver_lockd.c
+++ b/src/locking/lock_driver_lockd.c
@@ -21,8 +21,6 @@

 #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 626ef15403..ec6d0686f4 100644
--- a/src/logging/log_daemon_config.c
+++ b/src/logging/log_daemon_config.c
@@ -21,8 +21,6 @@

 #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 a6be352b22..2e4cc4f51a 100644
--- a/src/lxc/lxc_conf.c
+++ b/src/lxc/lxc_conf.c
@@ -23,8 +23,6 @@
 /* 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 b647743206..4137d1b04f 100644
--- a/src/lxc/lxc_fuse.c
+++ b/src/lxc/lxc_fuse.c
@@ -23,7 +23,6 @@
 #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 af71e32499..4c23a55326 100644
--- a/src/network/leaseshelper.c
+++ b/src/network/leaseshelper.c
@@ -23,7 +23,6 @@

 #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 424daeb3c7..32bbf6d05c 100644
--- a/src/nwfilter/nwfilter_ebiptables_driver.c
+++ b/src/nwfilter/nwfilter_ebiptables_driver.c
@@ -25,7 +25,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <sys/utsname.h>
-#include <unistd.h>

 #include "internal.h"

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 58029ab20c..f0bf1aa4fe 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -64,7 +64,6 @@
 #endif
 #include <sys/time.h>
 #include <fcntl.h>
-#include <unistd.h>
 #if defined(HAVE_SYS_MOUNT_H)
 # include <sys/mount.h>
 #endif
diff --git a/src/remote/remote_daemon_config.c b/src/remote/remote_daemon_config.c
index 59f14bdbdc..a56aa9065a 100644
--- a/src/remote/remote_daemon_config.c
+++ b/src/remote/remote_daemon_config.c
@@ -21,8 +21,6 @@

 #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 5718557411..6f8ca8cd54 100644
--- a/src/security/security_dac.c
+++ b/src/security/security_dac.c
@@ -22,7 +22,6 @@
 #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 9bcd8f85ab..74ab0d0dd3 100644
--- a/src/security/security_manager.c
+++ b/src/security/security_manager.c
@@ -22,7 +22,6 @@
 #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 1570170d0e..8817970f44 100644
--- a/src/storage/storage_file_fs.c
+++ b/src/storage/storage_file_fs.c
@@ -23,7 +23,6 @@
 #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 7482b96a27..6224072db0 100644
--- a/src/util/vircgroupv1.c
+++ b/src/util/vircgroupv1.c
@@ -21,7 +21,6 @@
 #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 3264bff014..940ee58528 100644
--- a/src/util/vircgroupv2.c
+++ b/src/util/vircgroupv2.c
@@ -20,7 +20,6 @@
 #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 8e098b3634..5c0e9723b9 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -35,7 +35,6 @@
 #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 7fc500007f..e2009fd829 100644
--- a/src/util/virnetdevip.c
+++ b/src/util/virnetdevip.c
@@ -36,7 +36,6 @@
 #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 e916ba0a0a..c80a3a381f 100644
--- a/src/util/virnetdevmacvlan.c
+++ b/src/util/virnetdevmacvlan.c
@@ -24,8 +24,6 @@

 #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 b30204fe7f..fb05190c02 100644
--- a/src/util/virnetdevvportprofile.c
+++ b/src/util/virnetdevvportprofile.c
@@ -18,8 +18,6 @@

 #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 9bde5c1246..6ecfc29cb2 100644
--- a/src/util/virperf.c
+++ b/src/util/virperf.c
@@ -17,7 +17,6 @@
  */
 #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 a6ee6e1f4b..999bccbee4 100644
--- a/src/util/virpidfile.c
+++ b/src/util/virpidfile.c
@@ -26,7 +26,6 @@
 #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 5c94ae346b..198439cea2 100644
--- a/src/util/virpolkit.c
+++ b/src/util/virpolkit.c
@@ -21,7 +21,6 @@

 #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 e495233110..9e477fc064 100644
--- a/src/util/virresctrl.c
+++ b/src/util/virresctrl.c
@@ -22,7 +22,6 @@
 #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 477d70554b..ded9b039e5 100644
--- a/src/util/virutil.h
+++ b/src/util/virutil.h
@@ -24,6 +24,7 @@
 # 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 37166253cc..df7570bac6 100644
--- a/tests/eventtest.c
+++ b/tests/eventtest.c
@@ -22,7 +22,6 @@

 #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 b53763bc1d..9ba082d353 100644
--- a/tests/objecteventtest.c
+++ b/tests/objecteventtest.c
@@ -19,8 +19,6 @@

 #include <config.h>

-#include <unistd.h>
-
 #include "testutils.h"

 #include "virerror.h"
diff --git a/tests/scsihosttest.c b/tests/scsihosttest.c
index 01cd77462b..6989e4fc4a 100644
--- a/tests/scsihosttest.c
+++ b/tests/scsihosttest.c
@@ -25,7 +25,6 @@

 # 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 2f815a2bca..c70d7ab100 100644
--- a/tests/vboxsnapshotxmltest.c
+++ b/tests/vboxsnapshotxmltest.c
@@ -5,7 +5,6 @@
 #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 6e4805b42d..e2bd4953ed 100644
--- a/tests/virfiletest.c
+++ b/tests/virfiletest.c
@@ -19,7 +19,6 @@
 #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 f4d077d608..067cb30657 100644
--- a/tests/virfilewrapper.c
+++ b/tests/virfilewrapper.c
@@ -21,7 +21,6 @@
 #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 4dd485bc0e..991e587db6 100644
--- a/tests/virlockspacetest.c
+++ b/tests/virlockspacetest.c
@@ -20,7 +20,6 @@

 #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 d7b9db6641..3e9b007d9b 100644
--- a/tests/virnetdaemontest.c
+++ b/tests/virnetdaemontest.c
@@ -18,8 +18,6 @@

 #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 a7990ee5f3..9c14989287 100644
--- a/tests/virnetsockettest.c
+++ b/tests/virnetsockettest.c
@@ -23,7 +23,6 @@
 # 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 b94275b943..07910c2749 100644
--- a/tests/virnettlscontexttest.c
+++ b/tests/virnettlscontexttest.c
@@ -20,7 +20,6 @@

 #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 dfb747b45d..a6aacf4cc3 100644
--- a/tests/virnettlshelpers.c
+++ b/tests/virnettlshelpers.c
@@ -20,7 +20,6 @@

 #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 153c8929ed..41abbe7eaf 100644
--- a/tests/virnettlssessiontest.c
+++ b/tests/virnettlssessiontest.c
@@ -20,7 +20,6 @@

 #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 75c7be5822..be3ef6234e 100644
--- a/tests/virscsitest.c
+++ b/tests/virscsitest.c
@@ -19,7 +19,6 @@

 #include <config.h>

-#include <unistd.h>

 #include "virscsi.h"
 #include "testutils.h"
diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index d20559a636..4f23511240 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -18,7 +18,6 @@

 #include <config.h>

-#include <unistd.h>

 #include "testutils.h"
 #include "vircommand.h"
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux