From 80baa55bde1d6e411028b0965502cc7e29ebe23a Mon Sep 17 00:00:00 2001 From: yixinglu <2520865+yixinglu@users.noreply.github.com> Date: Mon, 21 Feb 2022 16:55:00 +0800 Subject: [PATCH] Fix compile error about SOL_TLS and TCP_ULP macros introduced after glibc 2.27 --- fizz/experimental/ktls/LinuxKTLS.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fizz/experimental/ktls/LinuxKTLS.h b/fizz/experimental/ktls/LinuxKTLS.h index 45378735f5e..6d7cd69fdc0 100644 --- a/fizz/experimental/ktls/LinuxKTLS.h +++ b/fizz/experimental/ktls/LinuxKTLS.h @@ -39,10 +39,11 @@ #if defined(__linux__) && !FOLLY_MOBILE #include +#include // Minimum version of linux uapi headers we require; this is when linux/tls.h // was introduced -#if LINUX_VERSION_CODE < 265216 +#if (LINUX_VERSION_CODE < 265216) || (__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 27) #define FIZZ_PLATFORM_CAPABLE_KTLS 0 #else #define FIZZ_PLATFORM_CAPABLE_KTLS 1