mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-05 04:25:19 +00:00
src: conditionalize use of net/if.h
The net/if.h is not portable so we must check for its existance and avoid using it when missing. Some use of net/if.h was redundant and could be removed. Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
2b45f453a3
commit
7f3eb533f4
@ -2338,4 +2338,4 @@ exclude_file_name_regexp--sc_prohibit_backslash_alignment = \
|
|||||||
^build-aux/syntax-check\.mk$$
|
^build-aux/syntax-check\.mk$$
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
|
exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
|
||||||
^src/util/virfile\.c$$
|
^src/util/(virfile|virnetdev|virnetdevip)\.[c,h]|$$
|
||||||
|
@ -381,6 +381,7 @@ AC_CHECK_HEADERS([\
|
|||||||
mntent.h \
|
mntent.h \
|
||||||
net/ethernet.h \
|
net/ethernet.h \
|
||||||
netinet/tcp.h \
|
netinet/tcp.h \
|
||||||
|
net/if.h \
|
||||||
pty.h \
|
pty.h \
|
||||||
pwd.h \
|
pwd.h \
|
||||||
stdarg.h \
|
stdarg.h \
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
# include <sys/ioctl.h>
|
# include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
#include <net/if.h>
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
@ -18,7 +18,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <net/if.h>
|
#ifdef HAVE_NET_IF_H
|
||||||
|
# include <net/if.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "virbitmap.h"
|
#include "virbitmap.h"
|
||||||
#include "virsocketaddr.h"
|
#include "virsocketaddr.h"
|
||||||
|
@ -31,7 +31,9 @@
|
|||||||
# include <sys/ioctl.h>
|
# include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <net/if.h>
|
#ifdef HAVE_NET_IF
|
||||||
|
# include <net/if.h>
|
||||||
|
#endif
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
@ -36,7 +36,9 @@
|
|||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
# include <sys/ioctl.h>
|
# include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
#include <net/if.h>
|
#ifdef HAVE_NET_IF_H
|
||||||
|
# include <net/if.h>
|
||||||
|
#endif
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
@ -36,7 +36,9 @@
|
|||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
# include <sys/ioctl.h>
|
# include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
#include <net/if.h>
|
#ifdef HAVE_NET_IF
|
||||||
|
# include <net/if.h>
|
||||||
|
#endif
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
# include <linux/if_tun.h> /* IFF_TUN, IFF_NO_PI */
|
# include <linux/if_tun.h> /* IFF_TUN, IFF_NO_PI */
|
||||||
|
Loading…
Reference in New Issue
Block a user