From: Daniel P. Berrange Date: Thu, 7 Mar 2013 16:35:59 +0000 (+0000) Subject: Ensure GET_VLAN_VID_CMD is always defined X-Git-Tag: v1.0.4-rc1~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ed2e54500c9bca212e931651585e4edacbdaa85;p=thirdparty%2Flibvirt.git Ensure GET_VLAN_VID_CMD is always defined The RHEL4 vintage header files do not define GET_VLAN_VID_CMD. Conditionally define it in our source, since the kernel can raise a runtime error if it isn't supported Signed-off-by: Daniel P. Berrange --- diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 296871c6a7..00e0f94f15 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -672,7 +672,7 @@ int virNetDevGetIndex(const char *ifname ATTRIBUTE_UNUSED, #endif /* ! SIOCGIFINDEX */ -#if defined(SIOCGIFVLAN) && defined(HAVE_STRUCT_IFREQ) +#if defined(SIOCGIFVLAN) && defined(HAVE_STRUCT_IFREQ) && defined(GET_VLAN_VID_CMD) int virNetDevGetVLanID(const char *ifname, int *vlanid) { struct vlan_ioctl_args vlanargs = {