[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] Magic error introduced by commit f09accc

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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]