diff --git a/libraries/libldap_r/thr_posix.c b/libraries/libldap_r/thr_posix.c index 3ea3d16f60..b2cebaeb76 100644 --- a/libraries/libldap_r/thr_posix.c +++ b/libraries/libldap_r/thr_posix.c @@ -14,14 +14,16 @@ * . */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE 1 /* For pthread_setconcurrency() on glibc */ -#endif #include "portable.h" #if defined( HAVE_PTHREADS ) +#ifdef __GLIBC__ +#undef _FEATURES_H +#define _XOPEN_SOURCE 500 /* For pthread_setconcurrency() on glibc */ +#endif + #include #ifdef REPLACE_BROKEN_YIELD