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
This commit is contained in:
Andre Puschmann 2020-05-04 21:01:27 +02:00 committed by Francisco Paisana
parent fbd889ad4d
commit 99c3975f83
2 changed files with 2 additions and 7 deletions

View File

@ -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)

View File

@ -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 <linux/ipv6.h>
#else
// Some versions of glibc yield to a compile error with gcc