From 3e004036412bbd5dec941a76b4f316701a3bc72e Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 13 Sep 2013 23:33:32 +0400 Subject: [PATCH] Explicitly specify that Darwin, Linux and Solaris platforms have dladdr() * include/private/gcconfig.h (HAVE_DLADDR): Define also for DARWIN (conditionally), LINUX and SOLARIS (conditionally). --- include/private/gcconfig.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 83a4444..0b4e02b 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -2814,9 +2814,10 @@ # define NEED_CALLINFO #endif -#if defined(FREEBSD) && !defined(HAVE_DLADDR) - /* TODO: Define for Darwin, Linux, Solaris. */ - /* TODO: Detect dladdr() presence by configure. */ +#if (defined(FREEBSD) || (defined(DARWIN) && !defined(_POSIX_C_SOURCE)) \ + || (defined(SOLARIS) && (!defined(_XOPEN_SOURCE) \ + || defined(__EXTENSIONS__))) \ + || defined(LINUX)) && !defined(HAVE_DLADDR) # define HAVE_DLADDR #endif -- 2.7.4