summaryrefslogtreecommitdiff
path: root/community/libvirt/libvirt-libnl3.patch
blob: 1e5f141b925d8149780f04bdd8ab26cd8131af3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
diff -wbBur libvirt-0.9.12/configure.ac libvirt-0.9.12.my/configure.ac
--- libvirt-0.9.12/configure.ac	2012-05-14 06:15:40.000000000 +0400
+++ libvirt-0.9.12.my/configure.ac	2012-05-17 13:18:22.000000000 +0400
@@ -71,7 +71,7 @@
 LIBCURL_REQUIRED="7.18.0"
 OPENWSMAN_REQUIRED="2.2.3"
 LIBPCAP_REQUIRED="1.0.0"
-LIBNL_REQUIRED="1.1"
+LIBNL_REQUIRED="3.2"
 LIBSSH2_REQUIRED="1.0"
 LIBBLKID_REQUIRED="2.17"
 DBUS_REQUIRED="1.0.0"
@@ -2652,21 +2652,9 @@
     PKG_CHECK_MODULES([LIBNL], [libnl-3.0], [
         have_libnl=yes
         AC_DEFINE([HAVE_LIBNL3], [1], [Use libnl-3.0])
-        AC_DEFINE([HAVE_LIBNL], [1], [whether the netlink library is available])
         PKG_CHECK_MODULES([LIBNL_ROUTE3], [libnl-route-3.0])
         LIBNL_CFLAGS="$LIBNL_CFLAGS $LIBNL_ROUTE3_CFLAGS"
         LIBNL_LIBS="$LIBNL_LIBS $LIBNL_ROUTE3_LIBS"
-    ], [PKG_CHECK_MODULES([LIBNL], [libnl-1 >= $LIBNL_REQUIRED], [
-            have_libnl=yes
-            AC_DEFINE_UNQUOTED([HAVE_LIBNL], [1],
-             [whether the netlink library is available])
-            AC_DEFINE_UNQUOTED([HAVE_LIBNL1], [1],
-             [whether the netlink v1 library is available])
-        ], [
-            if test "$with_macvtap" = "yes"; then
-                AC_MSG_ERROR([libnl-devel >= $LIBNL_REQUIRED is required for macvtap support])
-            fi
-        ])
     ])
 fi
 AM_CONDITIONAL([HAVE_LIBNL], [test "$have_libnl" = "yes"])
diff -wbBur libvirt-0.9.12/daemon/Makefile.am libvirt-0.9.12.my/daemon/Makefile.am
--- libvirt-0.9.12/daemon/Makefile.am	2012-04-20 08:25:25.000000000 +0400
+++ libvirt-0.9.12.my/daemon/Makefile.am	2012-05-17 13:18:22.000000000 +0400
@@ -96,6 +96,7 @@
 	$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
 	$(XDR_CFLAGS) $(POLKIT_CFLAGS) $(DBUS_CFLAGS) \
 	$(WARN_CFLAGS) \
+	$(LIBNL_CFLAGS) \
 	$(COVERAGE_CFLAGS) \
 	-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" \
 	-DREMOTE_PID_FILE="\"$(REMOTE_PID_FILE)\""
diff -wbBur libvirt-0.9.12/src/Makefile.am libvirt-0.9.12.my/src/Makefile.am
--- libvirt-0.9.12/src/Makefile.am	2012-05-05 16:53:48.000000000 +0400
+++ libvirt-0.9.12.my/src/Makefile.am	2012-05-17 13:18:22.000000000 +0400
@@ -16,6 +16,7 @@
 
 AM_CFLAGS =	$(DRIVER_MODULE_CFLAGS)				\
 		$(LIBXML_CFLAGS)				\
+                $(LIBNL_CFLAGS)                                 \
 		$(WARN_CFLAGS)					\
 		$(LOCK_CHECKING_CFLAGS)				\
 		$(WIN32_EXTRA_CFLAGS)				\
diff -wbBur libvirt-0.9.12/src/util/virnetdevmacvlan.c libvirt-0.9.12.my/src/util/virnetdevmacvlan.c
--- libvirt-0.9.12/src/util/virnetdevmacvlan.c	2012-05-09 05:21:54.000000000 +0400
+++ libvirt-0.9.12.my/src/util/virnetdevmacvlan.c	2012-05-17 13:25:21.000000000 +0400
@@ -27,6 +27,10 @@
 
 #include <config.h>
 
+#include <netlink/msg.h>
+#include <linux/rtnetlink.h>
+#include <linux/if_link.h>
+
 #include "virnetdevmacvlan.h"
 #include "virmacaddr.h"
 #include "util.h"
diff -wbBur libvirt-0.9.12/src/util/virnetdevvportprofile.c libvirt-0.9.12.my/src/util/virnetdevvportprofile.c
--- libvirt-0.9.12/src/util/virnetdevvportprofile.c	2012-05-09 05:21:54.000000000 +0400
+++ libvirt-0.9.12.my/src/util/virnetdevvportprofile.c	2012-05-17 13:27:54.000000000 +0400
@@ -22,6 +22,10 @@
 
 #include <config.h>
 
+#include <netlink/msg.h>
+#include <linux/rtnetlink.h>
+#include <linux/if_link.h>
+
 #include "virnetdevvportprofile.h"
 #include "virterror_internal.h"
 
diff -wbBur libvirt-0.9.12/src/util/virnetlink.c libvirt-0.9.12.my/src/util/virnetlink.c
--- libvirt-0.9.12/src/util/virnetlink.c	2012-05-09 16:41:41.000000000 +0400
+++ libvirt-0.9.12.my/src/util/virnetlink.c	2012-05-17 13:38:08.000000000 +0400
@@ -49,7 +49,7 @@
 
 #define NETLINK_ACK_TIMEOUT_S  2
 
-#if defined(__linux__) && defined(HAVE_LIBNL)
+#if defined(__linux__) && defined(HAVE_LIBNL3)
 /* State for a single netlink event handle */
 struct virNetlinkEventHandle {
     int watch;
diff -wbBur libvirt-0.9.12/src/util/virnetlink.h libvirt-0.9.12.my/src/util/virnetlink.h
--- libvirt-0.9.12/src/util/virnetlink.h	2012-05-09 05:21:54.000000000 +0400
+++ libvirt-0.9.12.my/src/util/virnetlink.h	2012-05-17 13:27:37.000000000 +0400
@@ -23,9 +23,10 @@
 # include "config.h"
 # include "internal.h"
 
-# if defined(__linux__) && defined(HAVE_LIBNL)
+# if defined(__linux__) && defined(HAVE_LIBNL3)
 
 #  include <netlink/msg.h>
+#  include <stdint.h>
 
 # else