Re: [PATCH v3 2/4] Make virNetDevSetupControl() public.

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

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]