[libvirt] [PATCH] build: work around broken kernel header

I got this scary warning during ./configure on rawhide: checking linux/if_bridge.h usability... no checking linux/if_bridge.h presence... yes configure: WARNING: linux/if_bridge.h: present but cannot be compiled configure: WARNING: linux/if_bridge.h: check for missing prerequisite headers? configure: WARNING: linux/if_bridge.h: see the Autoconf documentation configure: WARNING: linux/if_bridge.h: section "Present But Cannot Be Compiled" configure: WARNING: linux/if_bridge.h: proceeding with the compiler's result configure: WARNING: ## ------------------------------------- ## configure: WARNING: ## Report this to libvir-list@redhat.com ## configure: WARNING: ## ------------------------------------- ## checking for linux/if_bridge.h... no * configure.ac (AC_CHECK_HEADERS): Provide struct in6_addr, since linux/if_bridge.h uses it without declaring it. --- Pushing under the build-breaker rule. I also plan on opening a BZ against the kernel headers. configure.ac | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 753916c..31e7f80 100644 --- a/configure.ac +++ b/configure.ac @@ -978,7 +978,9 @@ dnl if test "$with_linux" = "yes"; then if test "$with_qemu" = "yes" || test "$with_lxc" = "yes" ; then AC_CHECK_HEADERS([linux/param.h linux/sockios.h linux/if_bridge.h linux/if_tun.h],, - AC_MSG_ERROR([You must install kernel-headers in order to compile libvirt with QEMU or LXC support])) + [AC_MSG_ERROR([You must install kernel-headers in order to compile libvirt with QEMU or LXC support])], + [[#include <netinet/ip6.h> + ]]) fi fi -- 1.7.1

configure: WARNING: linux/if_bridge.h: present but cannot be compiled
Pushing under the build-breaker rule. I also plan on opening a BZ against the kernel headers.
https://bugzilla.redhat.com/show_bug.cgi?id=895141 -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Commit c308a9ae was incomplete; it resolved the configure failure, but not a later build failure. * src/util/virnetdevbridge.c: Include pre-req header. * configure.ac (AC_CHECK_HEADERS): Prefer standard in.h over non-standard ip6.h. --- again pushing under the build-breaker rule configure.ac | 2 +- src/util/virnetdevbridge.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 1d0add5..0e15c0c 100644 --- a/configure.ac +++ b/configure.ac @@ -979,7 +979,7 @@ if test "$with_linux" = "yes"; then if test "$with_qemu" = "yes" || test "$with_lxc" = "yes" ; then AC_CHECK_HEADERS([linux/param.h linux/sockios.h linux/if_bridge.h linux/if_tun.h],, [AC_MSG_ERROR([You must install kernel-headers in order to compile libvirt with QEMU or LXC support])], - [[#include <netinet/ip6.h> + [[#include <netinet/in.h> ]]) fi fi diff --git a/src/util/virnetdevbridge.c b/src/util/virnetdevbridge.c index b87c601..3c00be9 100644 --- a/src/util/virnetdevbridge.c +++ b/src/util/virnetdevbridge.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2012 Red Hat, Inc. + * Copyright (C) 2007-2013 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -32,6 +32,7 @@ #include <sys/ioctl.h> #include <sys/socket.h> #include <net/if.h> +#include <netinet/in.h> #ifdef __linux__ # include <linux/sockios.h> -- 1.7.1
participants (1)
-
Eric Blake