On 02/04/2013 03:38 PM, Eric Blake wrote: > On 01/26/2013 08:13 AM, Roman Bogorodskiy wrote: >> --- >> src/libvirt_private.syms | 1 + >> src/util/virnetdev.c | 6 ++++-- >> src/util/virnetdev.h | 6 ++++++ >> 3 files changed, 11 insertions(+), 2 deletions(-) >>
>> +++ b/src/util/virnetdev.h
>> @@ -28,6 +28,12 @@
>> # include "virmacaddr.h"
>> # include "virpci.h"
>>
>> +# include <net/if.h>
>
> <net/if.h> is a standard header (and therefore guaranteed by gnulib), but...
>
>> +
>> +int virNetDevSetupControl(const char *ifname,
>> + struct ifreq *ifr)
>
> struct ifreq is a non-standard type, and therefore this will cause
> compilation errors on platforms that lack this struct (hello mingw).
Oddly enough, it also causes compilation errors on Linux; at least with
the kernel headers present in current Fedora 18:
CC libvirt_util_la-virnetdevmacvlan.lo
In file included from util/virnetdev.h:31:0,
from util/virnetdevmacvlan.c:64:
/usr/include/net/if.h:44:5: error: expected identifier before numeric
constant
In file included from util/virnetdev.h:31:0,
from util/virnetdevmacvlan.c:64:
/usr/include/net/if.h:111:8: error: redefinition of 'struct ifmap'
...
I'm not sure if this is related to the known kernel header bug (see the
big thread at
https://www.redhat.com/archives/libvir-list/2013-January/thread.html#00891),
but it definitely must be resolved before we can hoist 'struct ifreq *'
into a header that is included in multiple files.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
