]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Fix macvtap detection by also checking for IFLA_VF_MAX
authorGuido Günther <agx@sigxcpu.org>
Sat, 14 Apr 2012 17:18:03 +0000 (19:18 +0200)
committerGuido Günther <agx@sigxcpu.org>
Sun, 15 Apr 2012 09:54:20 +0000 (11:54 +0200)
since this isn't available on older kernels such as Debian Squeeze's
2.6.32. This make --with-macvtap=check work as expected.

configure.ac

index 3f5b3ffecb2facce3fcbfaf225b7d06abe0134b6..53c9b34ee6f1cbe4c72eede2aa71ad3a0f680b8e 100644 (file)
@@ -2534,7 +2534,8 @@ AC_MSG_CHECKING([whether to compile with macvtap support])
 if test "$with_macvtap" != "no" ; then
     AC_TRY_COMPILE([ #include <sys/socket.h>
                      #include <linux/rtnetlink.h> ],
-                   [ int x = MACVLAN_MODE_BRIDGE; ],
+                   [ int x = MACVLAN_MODE_BRIDGE;
+                     int y = IFLA_VF_MAX; ],
                    [ with_macvtap=yes ],
                    [ if test "$with_macvtap" = "yes" ; then
                          AC_MSG_ERROR([Installed linux headers don't show support for macvtap device.])