Skip to content

Commit b902a40

Browse files
authored
Rewrite glibc version check
1 parent 5991d1a commit b902a40

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

driver/others/memory.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,17 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7373

7474
#include "common.h"
7575

76-
#if defined(USE_TLS) && ( !defined(__GLIBC_PREREQ) || (defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2,20)))
77-
#warning "using tls version of memory.c"
76+
#if defined(USE_TLS)
77+
#define COMPILE_TLS
78+
#if defined(__GLIBC_PREREQ)
79+
#if !__GLIBC_PREREQ(2,20))
80+
#undef COMPILE_TLS
81+
#endif
82+
#endif
83+
#endif
84+
85+
#if defined(COMPILE_TLS)
86+
7887
#include <errno.h>
7988

8089
#if defined(OS_WINDOWS) && !defined(OS_CYGWIN_NT)

0 commit comments

Comments
 (0)