From 124b4c381baf473a097b2d8713bd1ca191f9a352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C3=A9veill=C3=A9?= Date: Sun, 16 Aug 2015 10:22:05 +0200 Subject: [PATCH] regex_debug.c: Stop including dlfcn.h Since the block of code has been disabled anyway and is not very portable, we introduce a define to control both the include and the code. --- src/backends/regex_debug.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/backends/regex_debug.c b/src/backends/regex_debug.c index 8e54f5c..d28f9b2 100644 --- a/src/backends/regex_debug.c +++ b/src/backends/regex_debug.c @@ -3,13 +3,16 @@ #include #include +#define USE_DLADDR (0) - +#if USE_DLADDR // This is some spectacularly non-portable code... but whee! #include -char* getsym(void* addr) { +#endif + +char* getsym(HSVMActionFunc addr) { char* retstr; -#if 0 +#if USE_DLADDR // This will be fixed later. Dl_info dli; if (dladdr(addr, &dli) != 0 && dli.dli_sname != NULL) {