From 05a38d4c4ac035ca5dac0f00ce641a8f9b087831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Fri, 17 Jan 2020 12:17:58 +0000 Subject: [PATCH] src: conditionalize / remove use of sys/ioctl.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Daniel P. Berrangé --- src/util/virhostcpu.c | 4 +++- src/util/virhostdev.c | 1 - src/util/virhostmem.c | 1 - src/util/virnetdev.c | 4 +++- src/util/virnetdevbridge.c | 4 +++- src/util/virnetdevip.c | 4 +++- src/util/virnetdevtap.c | 4 +++- src/util/virperf.c | 4 +++- src/util/virvsock.c | 4 +++- 9 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index f9d5db59b9..0bde532a0c 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -24,7 +24,9 @@ #include #include #include -#include +#ifndef WIN32 +# include +#endif #include #if HAVE_LINUX_KVM_H diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 9b4ea30216..f8f7989206 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/util/virhostmem.c b/src/util/virhostmem.c index 9c08b9bd78..f37d1ad588 100644 --- a/src/util/virhostmem.c +++ b/src/util/virhostmem.c @@ -23,7 +23,6 @@ #include #include -#include #include #if defined(__FreeBSD__) || defined(__APPLE__) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index e2aad07c24..b896a7507e 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -31,7 +31,9 @@ #include "virutil.h" #include "virjson.h" -#include +#ifndef WIN32 +# include +#endif #include #include diff --git a/src/util/virnetdevbridge.c b/src/util/virnetdevbridge.c index a37bcb4004..5bb533f1f0 100644 --- a/src/util/virnetdevbridge.c +++ b/src/util/virnetdevbridge.c @@ -27,7 +27,9 @@ #include "virlog.h" #include "virstring.h" -#include +#ifndef WIN32 +# include +#endif #include #include #include diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index 5696bc367e..5897c4aa76 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -33,7 +33,9 @@ # include #endif -#include +#ifndef WIN32 +# include +#endif #include #include diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index 6a16b58d60..8656e267cb 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -33,7 +33,9 @@ #include #include -#include +#ifndef WIN32 +# include +#endif #include #include #ifdef __linux__ diff --git a/src/util/virperf.c b/src/util/virperf.c index 29c388a1f2..04d27309e1 100644 --- a/src/util/virperf.c +++ b/src/util/virperf.c @@ -17,7 +17,9 @@ */ #include -#include +#ifndef WIN32 +# include +#endif #if defined HAVE_SYS_SYSCALL_H # include #endif diff --git a/src/util/virvsock.c b/src/util/virvsock.c index b28287fdee..2638c5095a 100644 --- a/src/util/virvsock.c +++ b/src/util/virvsock.c @@ -17,7 +17,9 @@ #include -#include +#ifdef HAVE_SYS_IOCTL_H +# include +#endif #if HAVE_DECL_VHOST_VSOCK_SET_GUEST_CID # include -- GitLab