]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: Drop netinet workaround
authorAndrea Bolognani <abologna@redhat.com>
Wed, 26 May 2021 16:30:06 +0000 (18:30 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 1 Jun 2021 12:30:39 +0000 (14:30 +0200)
It appears to no longer be necessary.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
meson.build
src/util/virnetdevbridge.c

index c514fd6d0664d840dfcc2ef3cb9d57c4fde53a49..a7981e7bc47dc8b15b32f6a10f2bb9a970b3a612 100644 (file)
@@ -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 <netinet/in.h>
-  #include <linux/in6.h>
-
-  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',
index 4fe84cc162293196b4e7ddf46c742511389b9e18..a9667b48ce07eefc7359fa7951f355a8212ca1fa 100644 (file)
 # endif
 # include <linux/sockios.h>
 # include <linux/param.h>     /* HZ                 */
-# if NETINET_LINUX_WORKAROUND
-/* Depending on the version of kernel vs. glibc, there may be a collision
- * between <net/in.h> 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 <linux/in6.h>
 # include <linux/if_bridge.h> /* 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)