From: Michal Privoznik Date: Tue, 28 Aug 2012 10:01:50 +0000 (+0200) Subject: build: define 'inline' iff HAVE_LIBNL1 X-Git-Tag: v0.10.0~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=500c24688942cb5bf2eb1d7d238531e86788eb29;p=thirdparty%2Flibvirt.git build: define 'inline' iff HAVE_LIBNL1 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. --- diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h index 82154de08a..b1a1750e1b 100644 --- a/src/util/virnetlink.h +++ b/src/util/virnetlink.h @@ -28,9 +28,13 @@ /* 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 -# undef inline +# ifdef HAVE_LIBNL1 +# undef inline +# endif # else