mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +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$$
|
||||
|
||||
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 \
|
||||
net/ethernet.h \
|
||||
netinet/tcp.h \
|
||||
net/if.h \
|
||||
pty.h \
|
||||
pwd.h \
|
||||
stdarg.h \
|
||||
|
@ -34,7 +34,6 @@
|
||||
#ifndef WIN32
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
#include <net/if.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef __linux__
|
||||
|
@ -18,7 +18,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <net/if.h>
|
||||
#ifdef HAVE_NET_IF_H
|
||||
# include <net/if.h>
|
||||
#endif
|
||||
|
||||
#include "virbitmap.h"
|
||||
#include "virsocketaddr.h"
|
||||
|
@ -31,7 +31,9 @@
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#ifdef HAVE_NET_IF
|
||||
# include <net/if.h>
|
||||
#endif
|
||||
#include <netinet/in.h>
|
||||
|
||||
#ifdef __linux__
|
||||
|
@ -36,7 +36,9 @@
|
||||
#ifndef WIN32
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
#include <net/if.h>
|
||||
#ifdef HAVE_NET_IF_H
|
||||
# include <net/if.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef __linux__
|
||||
|
@ -36,7 +36,9 @@
|
||||
#ifndef WIN32
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
#include <net/if.h>
|
||||
#ifdef HAVE_NET_IF
|
||||
# include <net/if.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#ifdef __linux__
|
||||
# include <linux/if_tun.h> /* IFF_TUN, IFF_NO_PI */
|
||||
|
Loading…
Reference in New Issue
Block a user