src: conditionalize / remove use of sys/ioctl.h

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>
This commit is contained in:
Daniel P. Berrangé 2020-01-17 12:17:58 +00:00
parent 1c18375cda
commit 05a38d4c4a
9 changed files with 21 additions and 9 deletions

View 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

View 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>

View File

@ -23,7 +23,6 @@
#include <sys/utsname.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <unistd.h>
#if defined(__FreeBSD__) || defined(__APPLE__)

View 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>

View 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>

View 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>

View 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__

View 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

View 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>