summaryrefslogtreecommitdiff
path: root/dyn_load.c
diff options
context:
space:
mode:
Diffstat (limited to 'dyn_load.c')
-rw-r--r--dyn_load.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/dyn_load.c b/dyn_load.c
index 679211dd..836e4bce 100644
--- a/dyn_load.c
+++ b/dyn_load.c
@@ -691,8 +691,13 @@ GC_FirstDLOpenedLinkMap(void)
}
if( cachedResult == 0 ) {
# if defined(NETBSD) && defined(RTLD_DI_LINKMAP)
+# if defined(CPPCHECK)
+# define GC_RTLD_DI_LINKMAP 2
+# else
+# define GC_RTLD_DI_LINKMAP RTLD_DI_LINKMAP
+# endif
struct link_map *lm = NULL;
- if (!dlinfo(RTLD_SELF, RTLD_DI_LINKMAP, &lm) && lm != NULL) {
+ if (!dlinfo(RTLD_SELF, GC_RTLD_DI_LINKMAP, &lm) && lm != NULL) {
/* Now lm points link_map object of libgc. Since it */
/* might not be the first dynamically linked object, */
/* try to find it (object next to the main object). */