From 2976cf85a4b062ec5e281841d73c70426757f86b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Fri, 15 Sep 2017 22:54:18 +0200 Subject: [PATCH] libroot.so: make first parameter of dladdr() const. This follows up on a mail from 2011: https://www.freelists.org/post/haiku-development/Changing-dladdr-to-take-const-void-for-first-parameter --- headers/posix/dlfcn.h | 2 +- src/system/libroot/posix/dlfcn.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/headers/posix/dlfcn.h b/headers/posix/dlfcn.h index 7fdce4fc64..e13ca6eee2 100644 --- a/headers/posix/dlfcn.h +++ b/headers/posix/dlfcn.h @@ -36,7 +36,7 @@ extern int dlclose(void *image); extern char *dlerror(void); extern void *dlopen(const char *path, int mode); extern void *dlsym(void *image, const char *symbolName); -extern int dladdr(void *addr, Dl_info *info); +extern int dladdr(const void *addr, Dl_info *info); #ifdef __cplusplus } diff --git a/src/system/libroot/posix/dlfcn.c b/src/system/libroot/posix/dlfcn.c index 58fb161f3d..84d58aedef 100644 --- a/src/system/libroot/posix/dlfcn.c +++ b/src/system/libroot/posix/dlfcn.c @@ -72,7 +72,7 @@ dlerror(void) int -dladdr(void *address, Dl_info *info) +dladdr(const void *address, Dl_info *info) { image_id image; char* imagePath;