projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e43d03e
)
_GNU_SOURCE needs to be defined before any standard header.
author
Richard Levitte
<levitte@openssl.org>
Mon, 6 Jun 2005 00:50:52 +0000
(
00:50
+0000)
committer
Richard Levitte
<levitte@openssl.org>
Mon, 6 Jun 2005 00:50:52 +0000
(
00:50
+0000)
crypto/dso/dso_dlfcn.c
patch
|
blob
|
history
diff --git
a/crypto/dso/dso_dlfcn.c
b/crypto/dso/dso_dlfcn.c
index 67a0f3291c492511c338333cfe0bc0b91b445fbd..56756cf54119fcc7e361838fc90b45e4c6759bd5 100644
(file)
--- a/
crypto/dso/dso_dlfcn.c
+++ b/
crypto/dso/dso_dlfcn.c
@@
-56,6
+56,16
@@
*
*/
*
*/
+/* We need to do this early, because stdio.h includes the header files
+ 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
+#endif
+
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/dso.h>
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/dso.h>
@@
-69,11
+79,6
@@
DSO_METHOD *DSO_METHOD_dlfcn(void)
#ifdef HAVE_DLFCN_H
#ifdef HAVE_DLFCN_H
-#ifdef __linux
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE /* make sure dladdr is declared */
-# endif
-#endif
#include <dlfcn.h>
#endif
#include <dlfcn.h>
#endif