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 <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2013-03-07 16:35:59 +00:00
parent 564e7d38a2
commit 3ed2e54500

View File

@ -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 = {