dlfcn: always define _GNU_SOURCE
authorKurt Roeckx <kurt@roeckx.be>
Mon, 23 Dec 2013 18:06:34 +0000 (19:06 +0100)
committerKurt Roeckx <kurt@roeckx.be>
Tue, 30 Dec 2014 15:53:48 +0000 (16:53 +0100)
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>
crypto/dso/dso_dlfcn.c

index 4a56aace0e367d952715dad514a036120945938c..faa9d76b42701b5ef0765287957e6dea527171cc 100644 (file)
    that handle _GNU_SOURCE and other similar macros.  Defining it later
    is simply too late, because those headers are protected from re-
    inclusion.  */
-#ifdef __linux
-# ifndef _GNU_SOURCE
-#  define _GNU_SOURCE  /* make sure dladdr is declared */
-# endif
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE   /* make sure dladdr is declared */
 #endif
 
 #include <stdio.h>