]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
src: conditionalize / remove use of sys/ioctl.h
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 17 Jan 2020 12:17:58 +0000 (12:17 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 17 Jan 2020 13:16:58 +0000 (13:16 +0000)
Remove many imports of sys/ioctl.h which are redundant,
and conditionalize remaining usage that needs to compile
on Windows platforms.

The previous change to remove the "nonblocking" gnulib
module indirectly caused the loss of the "ioctl" gnulib
module that we did not explicitly list in bootstrap.conf
despite relying on.

Rather than re-introduce the "ioctl" module this patch
makes it redundant.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/util/virhostcpu.c
src/util/virhostdev.c
src/util/virhostmem.c
src/util/virnetdev.c
src/util/virnetdevbridge.c
src/util/virnetdevip.c
src/util/virnetdevtap.c
src/util/virperf.c
src/util/virvsock.c

index f9d5db59b96edd90807323e55788e6231b9cc551..0bde532a0c615e99e64dbe39fdde1bda10d5ae5d 100644 (file)
@@ -24,7 +24,9 @@
 #include <dirent.h>
 #include <sys/utsname.h>
 #include <fcntl.h>
-#include <sys/ioctl.h>
+#ifndef WIN32
+# include <sys/ioctl.h>
+#endif
 #include <unistd.h>
 
 #if HAVE_LINUX_KVM_H
index 9b4ea30216085fa61208e9833e0c555026bb1861..f8f798920676ffbab0daf23c707ea269a0242f29 100644 (file)
@@ -22,7 +22,6 @@
 #include <config.h>
 
 #include <fcntl.h>
-#include <sys/ioctl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
index 9c08b9bd78298d0ebfbce09e2ba5ad3ac7b52e53..f37d1ad588ed038e845ec23d0508f157d93bbbc2 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <sys/utsname.h>
 #include <fcntl.h>
-#include <sys/ioctl.h>
 #include <unistd.h>
 
 #if defined(__FreeBSD__) || defined(__APPLE__)
index e2aad07c246b3492f228e1c97f8b73ccccdcaa39..b896a7507e83e87d2f3b61f14e6a0214f5dc42bc 100644 (file)
@@ -31,7 +31,9 @@
 #include "virutil.h"
 #include "virjson.h"
 
-#include <sys/ioctl.h>
+#ifndef WIN32
+# include <sys/ioctl.h>
+#endif
 #include <net/if.h>
 #include <fcntl.h>
 
index a37bcb4004762c4f0f9f65397c0ae984f4371e09..5bb533f1f0ce2bd591ca094776c11f9c2b696300 100644 (file)
@@ -27,7 +27,9 @@
 #include "virlog.h"
 #include "virstring.h"
 
-#include <sys/ioctl.h>
+#ifndef WIN32
+# include <sys/ioctl.h>
+#endif
 #include <sys/socket.h>
 #include <net/if.h>
 #include <netinet/in.h>
index 5696bc367e5c72bb6885db2c4a946129c3f6bd42..5897c4aa76b6c972aee546402fc55cc50d312843 100644 (file)
@@ -33,7 +33,9 @@
 # include <ifaddrs.h>
 #endif
 
-#include <sys/ioctl.h>
+#ifndef WIN32
+# include <sys/ioctl.h>
+#endif
 #include <net/if.h>
 #include <fcntl.h>
 
index 6a16b58d60b0136ffecf77ba21eefb03510ff5a9..8656e267cbbe19d62dacd106ae8c4d1c84c36a7f 100644 (file)
@@ -33,7 +33,9 @@
 
 #include <unistd.h>
 #include <sys/types.h>
-#include <sys/ioctl.h>
+#ifndef WIN32
+# include <sys/ioctl.h>
+#endif
 #include <net/if.h>
 #include <fcntl.h>
 #ifdef __linux__
index 29c388a1f20f943510a0dc42de38b647031aed7f..04d27309e1ec9624bcf88bc4476072b58085c74f 100644 (file)
@@ -17,7 +17,9 @@
  */
 #include <config.h>
 
-#include <sys/ioctl.h>
+#ifndef WIN32
+# include <sys/ioctl.h>
+#endif
 #if defined HAVE_SYS_SYSCALL_H
 # include <sys/syscall.h>
 #endif
index b28287fdee90c973fbd2a0dc8a9153bf60fc6f70..2638c5095a6fb9786ee75e1820a622db342d7473 100644 (file)
@@ -17,7 +17,9 @@
 
 #include <config.h>
 
-#include <sys/ioctl.h>
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
 
 #if HAVE_DECL_VHOST_VSOCK_SET_GUEST_CID
 # include <linux/vhost.h>