[libvirt] Magic error introduced by commit f09accc

Eric Blake eblake at redhat.com
Fri May 6 15:26:57 UTC 2011


On 05/06/2011 01:56 AM, Jiri Denemark wrote:
> Hi all,
> 
> After commit f09accc (buf: add virBufferVasprintf) libvirt no longer compiles
> with -Werror because of the following error:
> 
>     CC     libvirt_util_la-macvtap.lo
> cc1: warnings being treated as errors
> /usr/include/netlink/object.h:58: error: inline function 'nl_object_priv'
> declared but never defined
> 
> I must admit I don't understand why including stdarg.h (which seems to be the
> only change visible in macvtap.c) results in this warning.
> 
> Does anyone have an idea?

Which version of libnl and gcc?

Yes, I know exactly why you are getting the failure.  The gnulib stdarg
module requires C99 support for va_copy.  If this turns on -std=gnu99 in
CFLAGS, whereas that compiler flag was not previously present, then you
are getting a difference in gcc inline semantics.  And if libnl's
headers are buggy (or, better put, if they don't properly deal with the
fact that older gcc's 'static inline' semantics heavily differ from
C99's 'static inline' semantics, and that you have to properly guard the
code to get the desired semantics), then that would explain the problem.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110506/fddb3fab/attachment-0001.sig>


More information about the libvir-list mailing list