[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:18 PM, Jiri Denemark wrote:
>>> 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?
> 
> libnl-1.1, gcc-4.4.5
> 
> You are right, that the commit results in -std=gnu99 being added to gcc
> command line. However, the nl_object_priv is declared as
> 
> extern inline void *            nl_object_priv(struct nl_object *);
> 
> So not 'static inline' but 'extern inline', I guess the issue is the same,
> right?

We discussed more on IRC.  The problem is due to a bug in out-of-the-box
libnl headers, and has been patched in most distros to just delete the
'inline' as then you don't have to worry about whether you had old or
new gcc semantics for 'extern inline'.  That is, libvirt could probably
work around the issue by doing:

#define inline
#include <netlink/msg.h>
#undef inline

in src/util/macvtap.c.

However, I don't know if we should do that.  In one regards, the only
people that ever run into this are those that are using incompatible
self-built gcc and libnl (Jirka was testing on a gentoo system), and
we're doing the user a favor to have them patch their libnl headers
rather than making libvirt work around it.  Most distros (including RHEL
5, which stands as the current litmus test of how much workarounds we
have to support in libvirt) have already patched the header, or have an
old enough gcc that the problem doesn't hit in the first place.  And
someday, we should be moving on to newer libnl.

So unless anyone else speaks up, I won't bother writing a patch for
libvirt to work around the libnl bug.

-- 
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]