From 99c3975f832b6e0fecb8d40eec1e990bc1ad9d86 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Mon, 4 May 2020 21:01:27 +0200 Subject: [PATCH] remove CMake option to disable glibc header for IPv6 we've added this to allow building for older glibc version that cause issues with redefining some structs. this patch removes the flag and auto-detects it using the glibc version --- CMakeLists.txt | 6 ------ lib/include/srslte/upper/ipv6.h | 3 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a2adcc84f..f7286e4cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,6 @@ option(ENABLE_MSAN "Enable clang memory sanitizer" OFF) option(ENABLE_TIDY "Enable clang tidy" OFF) option(USE_LTE_RATES "Use standard LTE sampling rates" OFF) -option(USE_GLIBC_IPV6 "Use glibc's own ipv6.h" ON) option(USE_MKL "Use MKL instead of fftw" OFF) option(ENABLE_TIMEPROF "Enable time profiling" ON) @@ -379,11 +378,6 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFORCE_STANDARD_RATE") endif (USE_LTE_RATES) - if (USE_GLIBC_IPV6) - message(STATUS "Using default glibc header for IPv6 support.") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_GLIBC_IPV6") - endif (USE_GLIBC_IPV6) - if (AUTO_DETECT_ISA) find_package(SSE) endif (AUTO_DETECT_ISA) diff --git a/lib/include/srslte/upper/ipv6.h b/lib/include/srslte/upper/ipv6.h index 74c903c34..5ec2ff5b9 100644 --- a/lib/include/srslte/upper/ipv6.h +++ b/lib/include/srslte/upper/ipv6.h @@ -22,7 +22,8 @@ #ifndef SRSLTE_IPV6_H #define SRSLTE_IPV6_H -#ifdef USE_GLIBC_IPV6 +// as of glibc 2.19, the IPv6 issue seems to be fixed https://sourceware.org/bugzilla/show_bug.cgi?id=15850 +#if __GLIBC_PREREQ(2, 19) #include #else // Some versions of glibc yield to a compile error with gcc