mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 14:41:42 +03:00
Add configure check for gettid() presence
The gettid() function is available on Linux in glibc only since version 2.30. There are supported distributions that still use older glibc version. Thus add a configure check if the gettid() function is available and extend the check in src/prof_stack_range.c so it's skipped also when gettid() isn't available. Fixes: https://github.com/jemalloc/jemalloc/issues/2740
This commit is contained in:
parent
4b88bddbca
commit
17881ebbfd
2 changed files with 10 additions and 1 deletions
|
|
@ -2706,6 +2706,15 @@ if test "x${je_cv_pthread_mutex_adaptive_np}" = "xyes" ; then
|
|||
AC_DEFINE([JEMALLOC_HAVE_PTHREAD_MUTEX_ADAPTIVE_NP], [ ], [ ])
|
||||
fi
|
||||
|
||||
JE_COMPILABLE([gettid], [
|
||||
#include <unistd.h>
|
||||
], [
|
||||
int tid = gettid();
|
||||
], [je_cv_gettid])
|
||||
if test "x${je_cv_gettid}" = "xyes" ; then
|
||||
AC_DEFINE([JEMALLOC_HAVE_GETTID], [ ], [ ])
|
||||
fi
|
||||
|
||||
JE_CFLAGS_SAVE()
|
||||
JE_CFLAGS_ADD([-D_GNU_SOURCE])
|
||||
JE_CFLAGS_ADD([-Werror])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue