]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix build on non-linux platforms after another VIR_AUTOPTR patches
authorErik Skultety <eskultet@redhat.com>
Tue, 14 Aug 2018 10:08:51 +0000 (12:08 +0200)
committerErik Skultety <eskultet@redhat.com>
Tue, 14 Aug 2018 11:02:24 +0000 (13:02 +0200)
Caused by commit f7d0663d49. The problem is missing libnl library on
these platforms, so the VIR_DEFINE_AUTOPTR_FUNC has to be compiled in
conditionally.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
src/util/virnetlink.h

index 136b42b995ffaf63b1ec9e6e613abf3f446be7a7..1e1e616b415185e90daea444f8302f252404d0fe 100644 (file)
@@ -36,6 +36,9 @@
 #   undef inline
 #  endif
 
+typedef struct nl_msg virNetlinkMsg;
+VIR_DEFINE_AUTOPTR_FUNC(virNetlinkMsg, nlmsg_free)
+
 # else
 
 struct nl_msg;
@@ -45,8 +48,6 @@ struct nlmsghdr;
 
 # endif /* __linux__ */
 
-typedef struct nl_msg virNetlinkMsg;
-
 int virNetlinkStartup(void);
 void virNetlinkShutdown(void);
 
@@ -126,6 +127,4 @@ int virNetlinkEventAddClient(virNetlinkEventHandleCallback handleCB,
 int virNetlinkEventRemoveClient(int watch, const virMacAddr *macaddr,
                                 unsigned int protocol);
 
-VIR_DEFINE_AUTOPTR_FUNC(virNetlinkMsg, nlmsg_free)
-
 #endif /* __VIR_NETLINK_H__ */