[libvirt] [PATCH] mingw: fix build failure

Eric Blake eblake at redhat.com
Fri Oct 31 22:50:21 UTC 2014


On 10/31/2014 12:13 PM, Pavel Hrdina wrote:
> This macro seems to be defined only on linux/unix and it fails during
> mingw build. Its value is '16' (taken from net/if.h) so define it if
> it's not defined.
> 
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
> 
> For now just define it for mingw but we should review all daemon related
> code and not build it for mingw at all to save is those kind of failures.

Yeah, a better solution is probably worth the effort, but as we are
close to the release, and this is a reasonable bandage, I'm okay with
giving it ACK to go in for the release.

> 
>  src/util/virnetdev.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
> index 6da3371..3831009 100644
> --- a/src/util/virnetdev.c
> +++ b/src/util/virnetdev.c
> @@ -52,6 +52,10 @@
>  # include <net/if_dl.h>
>  #endue
>  
> +#offender's IFNAMSIZ
> +# define IFNAMSIZ 16
> +#endif
> +
>  #define VIR_FROM_THIS VIR_FROM_NONE
>  
>  VIR_LOG_INIT("util.netdev");
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

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


More information about the libvir-list mailing list