From 5ca06d703bdf41d07e575bb71ef6820c9aa46cc5 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Wed, 26 May 2021 18:30:06 +0200 Subject: [PATCH] meson: Drop netinet workaround It appears to no longer be necessary. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- meson.build | 16 ---------------- src/util/virnetdevbridge.c | 18 ------------------ 2 files changed, 34 deletions(-) diff --git a/meson.build b/meson.build index c514fd6d06..a7981e7bc4 100644 --- a/meson.build +++ b/meson.build @@ -622,22 +622,6 @@ endforeach # check for kernel headers required by src/util/virnetdevbridge.c if host_machine.system() == 'linux' - # Various kernel versions have headers that are not self-standing, but - # yet are incompatible with the corresponding glibc headers. In order - # to guarantee compilation across a wide range of versions (from RHEL 5 - # to rawhide), we first have to probe whether glibc and kernel can be - # used in tandem; and if not, provide workarounds that ensure that - # ABI-compatible IPv6 types are present for use by the kernel headers. - netinet_workaround_code = ''' - #include - #include - - int main(void) { return 0; } - ''' - if not cc.compiles(netinet_workaround_code) - conf.set('NETINET_LINUX_WORKAROUND', 1) - endif - required_headers = [ 'linux/param.h', 'linux/sockios.h', diff --git a/src/util/virnetdevbridge.c b/src/util/virnetdevbridge.c index 4fe84cc162..a9667b48ce 100644 --- a/src/util/virnetdevbridge.c +++ b/src/util/virnetdevbridge.c @@ -37,26 +37,8 @@ # endif # include # include /* HZ */ -# if NETINET_LINUX_WORKAROUND -/* Depending on the version of kernel vs. glibc, there may be a collision - * between and kernel IPv6 structures. The different types - * are ABI compatible, but choke the C type system; work around it by - * using temporary redefinitions. */ -# define in6_addr in6_addr_ -# define sockaddr_in6 sockaddr_in6_ -# define ipv6_mreq ipv6_mreq_ -# define in6addr_any in6addr_any_ -# define in6addr_loopback in6addr_loopback_ -# endif # include # include /* SYSFS_BRIDGE_ATTR */ -# if NETINET_LINUX_WORKAROUND -# undef in6_addr -# undef sockaddr_in6 -# undef ipv6_mreq -# undef in6addr_any -# undef in6addr_loopback -# endif # define JIFFIES_TO_MS(j) (((j)*1000)/HZ) # define MS_TO_JIFFIES(ms) (((ms)*HZ)/1000) -- 2.47.2