-Subproject commit 271dd74fdf54ec2a03e73a5173b0b5697f6088f1
+Subproject commit 440a1dbe523e37f206252cb034c3a62f26867e42
crypto/md5
dirname-lgpl
environ
+execinfo
fclose
fcntl
fcntl-h
mkstemp
mkstemps
mktempd
+net_if
netdb
nonblocking
openpty
dnl Availability of various common headers (non-fatal if missing).
AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/un.h \
sys/poll.h syslog.h mntent.h net/ethernet.h linux/magic.h \
- sys/un.h sys/syscall.h netinet/tcp.h ifaddrs.h libtasn1.h \
- net/if.h execinfo.h])
+ sys/un.h sys/syscall.h netinet/tcp.h ifaddrs.h libtasn1.h])
dnl We need to decide at configure time if libvirt will use real atomic
dnl operations ("lock free") or emulated ones with a mutex.
AC_MSG_RESULT([$atomic_ops])
-
-AC_MSG_CHECKING([for struct ifreq in net/if.h])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [[
- #include <net/if.h>
- ]],
- [[
- struct ifreq ifr;
- ]])],[
- AC_DEFINE([HAVE_STRUCT_IFREQ],[],[Defined if struct ifreq existsin net/if.h])
- AC_MSG_RESULT([yes])
- ],[
- AC_MSG_RESULT([yes])
- ])
+AC_CHECK_TYPE([struct ifreq],
+ [AC_DEFINE([HAVE_STRUCT_IFREQ],[1],
+ [Defined if struct ifreq exists in net/if.h])],
+ [], [[#include <sys/socket.h>
+ #include <net/if.h>
+ ]])
dnl Our only use of libtasn1.h is in the testsuite, and can be skipped
dnl if the header is not present. Assume -ltasn1 is present if the
# define HOST_NAME_MAX 256
# endif
-# ifndef IF_NAMESIZE
-# define IF_NAMESIZE 16
-# endif
-
# ifndef INET_ADDRSTRLEN
# define INET_ADDRSTRLEN 16
# endif
* nwfilter_learnipaddr.h: support for learning IP address used by a VM
* on an interface
*
+ * Copyright (C) 2012 Red Hat, Inc.
* Copyright (C) 2010 IBM Corp.
* Copyright (C) 2010 Stefan Berger
*
# define __NWFILTER_LEARNIPADDR_H
# include "conf/nwfilter_params.h"
+# include <net/if.h>
enum howDetect {
DETECT_DHCP = 1,
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
+#include <execinfo.h>
#if HAVE_SYSLOG_H
# include <syslog.h>
#endif
-#ifdef HAVE_EXECINFO_H
-# include <execinfo.h>
-#endif
#include "virterror_internal.h"
#include "logging.h"
static void virLogStackTraceToFd(int fd)
{
-#ifdef HAVE_EXECINFO_H
void *array[100];
int size;
-
-# define STRIP_DEPTH 3
-
- size = backtrace(array, ARRAY_CARDINALITY(array));
- backtrace_symbols_fd(array + STRIP_DEPTH, size - STRIP_DEPTH, fd);
- ignore_value(safewrite(fd, "\n", 1));
-#else
static bool doneWarning = false;
const char *msg = "Stack trace not available on this platform\n";
- if (!doneWarning) {
+
+#define STRIP_DEPTH 3
+ size = backtrace(array, ARRAY_CARDINALITY(array));
+ if (size) {
+ backtrace_symbols_fd(array + STRIP_DEPTH, size - STRIP_DEPTH, fd);
+ ignore_value(safewrite(fd, "\n", 1));
+ } else if (!doneWarning) {
ignore_value(safewrite(fd, msg, strlen(msg)));
doneWarning = true;
}
-#endif
+#undef STRIP_DEPTH
}
static int virLogOutputToFd(const char *category ATTRIBUTE_UNUSED,
#include "logging.h"
#include <sys/ioctl.h>
-#ifdef HAVE_NET_IF_H
-# include <net/if.h>
-#endif
+#include <net/if.h>
#include <fcntl.h>
#ifdef __linux__
#include <sys/ioctl.h>
#include <sys/socket.h>
+#include <net/if.h>
-#ifdef HAVE_NET_IF_H
-# include <net/if.h>
-#endif
#ifdef __linux__
# include <linux/sockios.h>
# include <linux/param.h> /* HZ */
#define VIR_FROM_THIS VIR_FROM_NONE
-#if defined(HAVE_NET_IF_H) && defined(SIOCBRADDBR)
+#ifdef SIOCBRADDBR
static int virNetDevSetupControlFull(const char *ifname,
struct ifreq *ifr,
int domain,
#include "util.h"
#include <sys/ioctl.h>
-#ifdef HAVE_NET_IF_H
-# include <net/if.h>
-#endif
+#include <net/if.h>
#include <fcntl.h>
#ifdef __linux__
# include <linux/if_tun.h> /* IFF_TUN, IFF_NO_PI */