]> xenbits.xensource.com Git - libvirt.git/commitdiff
netlink: Fix build with libnl-3
authorJiri Denemark <jdenemar@redhat.com>
Wed, 9 May 2012 09:57:44 +0000 (11:57 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 9 May 2012 09:57:44 +0000 (11:57 +0200)
Commit 642973135c54b93242c4548ef27d591b52b0994c added three direct
references to nl_handle_* instead of using our aliases which hide
differences between libnl-3 and libnl-1.

src/util/virnetlink.c

index ac61ff086ef610d3892ff03a17e8ae0a8fac3f12..e31613764836649f5a8476f1d2d210f91416759c 100644 (file)
@@ -98,7 +98,7 @@ static int nextWatch = 1;
 # define NETLINK_EVENT_ALLOC_EXTENT 10
 
 static virNetlinkEventSrvPrivatePtr server = NULL;
-static struct nl_handle *placeholder_nlhandle = NULL;
+static virNetlinkHandle *placeholder_nlhandle = NULL;
 
 /* Function definitions */
 
@@ -130,7 +130,7 @@ virNetlinkStartup(void)
 {
     if (placeholder_nlhandle)
         return 0;
-    placeholder_nlhandle = nl_handle_alloc();
+    placeholder_nlhandle = virNetlinkAlloc();
     if (!placeholder_nlhandle) {
         virReportSystemError(errno, "%s",
                              _("cannot allocate placeholder nlhandle for netlink"));
@@ -149,7 +149,7 @@ void
 virNetlinkShutdown(void)
 {
     if (placeholder_nlhandle) {
-        nl_handle_destroy(placeholder_nlhandle);
+        virNetlinkFree(placeholder_nlhandle);
         placeholder_nlhandle = NULL;
     }
 }