virnetdev: Check for defined IFLA_VF_*
Thanks: Philipp Hahn
Guido Günther
12 years ago
10 | 10 |
Disable-failing-virnetsockettest.patch
|
11 | 11 |
Don-t-fail-if-we-can-t-setup-avahi.patch
|
12 | 12 |
virURIParse-don-t-forget-to-copy-the-user-part.patch
|
|
13 |
virnetdev-Check-for-defined-IFLA_VF_.patch
|
|
0 |
From: Philipp Hahn <hahn@univention.de>
|
|
1 |
Date: Fri, 13 Apr 2012 15:43:58 +0200
|
|
2 |
Subject: virnetdev: Check for defined IFLA_VF_*
|
|
3 |
|
|
4 |
The linux-2.6.32 kernel header does not yet define IFLA_VF_MAX and others,
|
|
5 |
which breaks compiling a new libvirt on old systems like Debian Squeeze.
|
|
6 |
|
|
7 |
(I also have to add --without-macvtap --disable-werror --without-virtualport to
|
|
8 |
./configure to get it to compile.)
|
|
9 |
|
|
10 |
Signed-off-by: Philipp Hahn <hahn@univention.de>
|
|
11 |
---
|
|
12 |
src/util/virnetdev.c | 2 +-
|
|
13 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
14 |
|
|
15 |
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
|
|
16 |
index ec7435a..460aa83 100644
|
|
17 |
--- a/src/util/virnetdev.c
|
|
18 |
+++ b/src/util/virnetdev.c
|
|
19 |
@@ -1215,7 +1215,7 @@ virNetDevGetVirtualFunctionInfo(const char *vfname ATTRIBUTE_UNUSED,
|
|
20 |
return -1;
|
|
21 |
}
|
|
22 |
#endif /* !__linux__ */
|
|
23 |
-#if defined(__linux__) && defined(HAVE_LIBNL)
|
|
24 |
+#if defined(__linux__) && defined(HAVE_LIBNL) && defined(IFLA_VF_MAX)
|
|
25 |
|
|
26 |
static struct nla_policy ifla_vf_policy[IFLA_VF_MAX+1] = {
|
|
27 |
[IFLA_VF_MAC] = { .type = NLA_UNSPEC,
|