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>
#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
#include <config.h>
#include <fcntl.h>
-#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/utsname.h>
#include <fcntl.h>
-#include <sys/ioctl.h>
#include <unistd.h>
#if defined(__FreeBSD__) || defined(__APPLE__)
#include "virutil.h"
#include "virjson.h"
-#include <sys/ioctl.h>
+#ifndef WIN32
+# include <sys/ioctl.h>
+#endif
#include <net/if.h>
#include <fcntl.h>
#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>
# include <ifaddrs.h>
#endif
-#include <sys/ioctl.h>
+#ifndef WIN32
+# include <sys/ioctl.h>
+#endif
#include <net/if.h>
#include <fcntl.h>
#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__
*/
#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
#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>