dlfcn: always define _GNU_SOURCE

We need this for the freebsd kernel with glibc as used in the Debian kfreebsd
ports.  There shouldn't be a problem defining this on systems not using glibc.

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Kurt Roeckx 2013-12-23 19:06:34 +01:00
parent 5984c7e3d5
commit 06c3e65deb

View file

@ -60,10 +60,8 @@
that handle _GNU_SOURCE and other similar macros. Defining it later that handle _GNU_SOURCE and other similar macros. Defining it later
is simply too late, because those headers are protected from re- is simply too late, because those headers are protected from re-
inclusion. */ inclusion. */
#ifdef __linux #ifndef _GNU_SOURCE
# ifndef _GNU_SOURCE # define _GNU_SOURCE /* make sure dladdr is declared */
# define _GNU_SOURCE /* make sure dladdr is declared */
# endif
#endif #endif
#include <stdio.h> #include <stdio.h>