From b902a409863f14e3334ae79265fa353f21f98ed7 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sun, 26 Aug 2018 11:18:02 +0200 Subject: [PATCH] Rewrite glibc version check --- driver/others/memory.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/driver/others/memory.c b/driver/others/memory.c index 7688937e5..b2e154e8b 100644 --- a/driver/others/memory.c +++ b/driver/others/memory.c @@ -73,8 +73,17 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "common.h" -#if defined(USE_TLS) && ( !defined(__GLIBC_PREREQ) || (defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2,20))) -#warning "using tls version of memory.c" +#if defined(USE_TLS) +#define COMPILE_TLS +#if defined(__GLIBC_PREREQ) +#if !__GLIBC_PREREQ(2,20)) +#undef COMPILE_TLS +#endif +#endif +#endif + +#if defined(COMPILE_TLS) + #include #if defined(OS_WINDOWS) && !defined(OS_CYGWIN_NT)