]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: define 'inline' iff HAVE_LIBNL1
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 28 Aug 2012 10:01:50 +0000 (12:01 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 28 Aug 2012 10:09:43 +0000 (12:09 +0200)
Previous commit 0b4b53bb80 defined 'inline' to prevent broken build on
systems with libnl1 headers. However, it broke build on systems with
libnl3 headers. Therefore we must make that fix conditional.

src/util/virnetlink.h

index 82154de08a2e18ab7504769783dfb2428ad5bff7..b1a1750e1b23300fcf537e0251830759d3508f75 100644 (file)
 
 /* Work around a bug where older libnl-1 headers expected older gcc
  * semantics of 'extern inline' that conflict with C99 semantics.  */
-#  define inline
+#  ifdef HAVE_LIBNL1
+#   define inline
+#  endif
 #  include <netlink/msg.h>
-#  undef inline
+#  ifdef HAVE_LIBNL1
+#   undef inline
+#  endif
 
 # else