[libvirt] [PATCH v2] nwfilter: Don't compile nwfilter driver on other systems than Linux

v2: check 'with_linux' rather than using uname -s for checking for target system Don't compile the nwfilter driver (instantiating the rules) on other systems than Linux. Signed-off-by: Stefan Berger <stefanb@us.ibm.com> diff --git a/configure.ac b/configure.ac index 23181dd..6100610 100644 --- a/configure.ac +++ b/configure.ac @@ -1360,15 +1360,6 @@ if test "$with_secrets" = "yes" ; then fi AM_CONDITIONAL([WITH_SECRETS], [test "$with_secrets" = "yes"]) -with_nwfilter=yes -if test "$with_libvirtd" = "no"; then - with_nwfilter=no -fi -if test "$with_nwfilter" = "yes" ; then - AC_DEFINE([WITH_NWFILTER], 1, [whether local network filter management driver is available]) -fi -AM_CONDITIONAL([WITH_NWFILTER], [test "$with_nwfilter" = "yes"]) - AC_ARG_WITH([storage-fs], AC_HELP_STRING([--with-storage-fs], [with FileSystem backend for the storage driver @<:@default=check@:>@]),[],[with_storage_fs=check]) @@ -2040,6 +2031,16 @@ esac AM_CONDITIONAL([WITH_LINUX], [test "$with_linux" = "yes"]) +with_nwfilter=yes +if test "$with_libvirtd" = "no" || test "$with_linux" != "yes"; then + with_nwfilter=no +fi +if test "$with_nwfilter" = "yes" ; then + AC_DEFINE([WITH_NWFILTER], 1, [whether local network filter management driver is available]) +fi +AM_CONDITIONAL([WITH_NWFILTER], [test "$with_nwfilter" = "yes"]) + + AC_ARG_WITH([qemu-user], AC_HELP_STRING([--with-qemu-user], [username to run QEMU system instance as @<:@default=root@:>@]), [QEMU_USER=${withval}],

On 09/27/2010 12:35 PM, Stefan Berger wrote:
v2: check 'with_linux' rather than using uname -s for checking for target system
Don't compile the nwfilter driver (instantiating the rules) on other systems than Linux.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
ACK. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 09/27/2010 03:27 PM, Eric Blake wrote:
On 09/27/2010 12:35 PM, Stefan Berger wrote:
v2: check 'with_linux' rather than using uname -s for checking for target system
Don't compile the nwfilter driver (instantiating the rules) on other systems than Linux.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
ACK.
Pushed. Stefan

On 09/28/2010 05:51 AM, Stefan Berger wrote:
On 09/27/2010 03:27 PM, Eric Blake wrote:
On 09/27/2010 12:35 PM, Stefan Berger wrote:
v2: check 'with_linux' rather than using uname -s for checking for target system
Don't compile the nwfilter driver (instantiating the rules) on other systems than Linux.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
ACK.
Pushed. Stefan
Just tested this, and it allows the libvirt daemon to compile on OSX, without the need for my ETH_ALEN patch, pushed right before it. I'll submit a new patch to reverse mine. :)

This reverses commit 04c3704, which added a define to nwfilter to allow libvirtd compilation on Mac OS X. Stefan Bergers commit, 2e7294d, is the proper solution, removing the requirement for nwfilter on non-Linux. --- src/nwfilter/nwfilter_learnipaddr.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c index 7fc55a6..7c94fc2 100644 --- a/src/nwfilter/nwfilter_learnipaddr.c +++ b/src/nwfilter/nwfilter_learnipaddr.c @@ -38,11 +38,6 @@ #include <net/if_arp.h> #include <intprops.h> -// Add Linux define missing from OSX -#ifndef ETH_ALEN -# define ETH_ALEN 6 /* Octets in one ethernet addr */ -#endif - #include "internal.h" #include "buf.h" -- 1.7.3

On 09/27/2010 09:10 PM, Justin Clift wrote:
This reverses commit 04c3704, which added a define to nwfilter to allow libvirtd compilation on Mac OS X. Stefan Bergers commit, 2e7294d, is the proper solution, removing the requirement for nwfilter on non-Linux. --- src/nwfilter/nwfilter_learnipaddr.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c index 7fc55a6..7c94fc2 100644 --- a/src/nwfilter/nwfilter_learnipaddr.c +++ b/src/nwfilter/nwfilter_learnipaddr.c @@ -38,11 +38,6 @@ #include<net/if_arp.h> #include<intprops.h>
-// Add Linux define missing from OSX -#ifndef ETH_ALEN -# define ETH_ALEN 6 /* Octets in one ethernet addr */ -#endif - #include "internal.h"
#include "buf.h" ACK.
Stefan

On 09/28/2010 08:48 PM, Stefan Berger wrote:
On 09/27/2010 09:10 PM, Justin Clift wrote:
This reverses commit 04c3704, which added a define to nwfilter to allow libvirtd compilation on Mac OS X. Stefan Bergers commit, 2e7294d, is the proper solution, removing the requirement for nwfilter on non-Linux. <snip> ACK.
Thanks, pushed. :)
participants (3)
-
Eric Blake
-
Justin Clift
-
Stefan Berger