From: Daniel P. Berrangé Date: Thu, 8 Dec 2022 09:45:20 +0000 (+0000) Subject: meson: remove obsolete check for GET_VLAN_VID_CMD X-Git-Tag: v9.0.0-rc1~176 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1c517d96595cd7619022c720ebdd7229745e754;p=thirdparty%2Flibvirt.git meson: remove obsolete check for GET_VLAN_VID_CMD The GET_VLAN_VID_CMD constant has existed since before Linux moved to git. This is old enough that all our supported platforms can be assumed to have this feature. Reviewed-by: Ján Tomko Signed-off-by: Daniel P. Berrangé --- diff --git a/meson.build b/meson.build index 7fb17bf983..f28af30936 100644 --- a/meson.build +++ b/meson.build @@ -650,9 +650,6 @@ symbols = [ # Check whether endian provides handy macros. [ 'endian.h', 'htole64' ], - # GET_VLAN_VID_CMD is required for virNetDevGetVLanID - [ 'linux/if_vlan.h', 'GET_VLAN_VID_CMD' ], - [ 'unistd.h', 'SEEK_HOLE' ], # Check for BSD approach for setting MAC addr diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 4be731d1b3..e0a1eb54e5 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -959,7 +959,7 @@ virNetDevGetMaster(const char *ifname G_GNUC_UNUSED, #endif /* defined(WITH_LIBNL) */ -#if defined(SIOCGIFVLAN) && defined(WITH_STRUCT_IFREQ) && WITH_DECL_GET_VLAN_VID_CMD +#if __linux__ int virNetDevGetVLanID(const char *ifname, int *vlanid) { struct vlan_ioctl_args vlanargs = { @@ -989,7 +989,7 @@ int virNetDevGetVLanID(const char *ifname, int *vlanid) *vlanid = vlanargs.u.VID; return 0; } -#else /* ! SIOCGIFVLAN */ +#else /* ! __linux__ */ int virNetDevGetVLanID(const char *ifname G_GNUC_UNUSED, int *vlanid G_GNUC_UNUSED) { @@ -997,7 +997,7 @@ int virNetDevGetVLanID(const char *ifname G_GNUC_UNUSED, _("Unable to get VLAN on this platform")); return -1; } -#endif /* ! SIOCGIFVLAN */ +#endif /* ! __linux__ */ /**