]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virnetdev: Check for defined IFLA_VF_*
authorPhilipp Hahn <hahn@univention.de>
Fri, 13 Apr 2012 13:43:58 +0000 (15:43 +0200)
committerGuido Günther <agx@sigxcpu.org>
Fri, 13 Apr 2012 19:15:22 +0000 (21:15 +0200)
The linux-2.6.32 kernel header does not yet define IFLA_VF_MAX and others,
which breaks compiling a new libvirt on old systems like Debian Squeeze.

(I also have to add --without-macvtap --disable-werror --without-virtualport to
 ./configure to get it to compile.)

Signed-off-by: Philipp Hahn <hahn@univention.de>
src/util/virnetdev.c

index ec7435a2e75e838e80aeb72c5f298502d6284fd1..460aa837d64cbbeeb45bd829de369c1d75647129 100644 (file)
@@ -1215,7 +1215,7 @@ virNetDevGetVirtualFunctionInfo(const char *vfname ATTRIBUTE_UNUSED,
     return -1;
 }
 #endif /* !__linux__ */
-#if defined(__linux__) && defined(HAVE_LIBNL)
+#if defined(__linux__) && defined(HAVE_LIBNL) && defined(IFLA_VF_MAX)
 
 static struct nla_policy ifla_vf_policy[IFLA_VF_MAX+1] = {
     [IFLA_VF_MAC]       = { .type = NLA_UNSPEC,