From d1c517d96595cd7619022c720ebdd7229745e754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 8 Dec 2022 09:45:20 +0000 Subject: [PATCH] meson: remove obsolete check for GET_VLAN_VID_CMD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é --- meson.build | 3 --- src/util/virnetdev.c | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) 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__ */ /**