[libvirt PATCH 05/26] meson: Drop netinet workaround

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It appears to no longer be necessary.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 meson.build                | 16 ----------------
 src/util/virnetdevbridge.c | 18 ------------------
 2 files changed, 34 deletions(-)

diff --git a/meson.build b/meson.build
index 1360dd325e..9c494faa5c 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 <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',
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 <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)
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux