From 839cc4e6da609a0b24f6cc32b0b11558fd77dd83 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 6 Jan 2014 22:03:38 -0500 Subject: const-qualify the address argument to dladdr this agrees with implementation practice on glibc and BSD systems, and is the const-correct way to do things; it eliminates warnings from passing pointers to const. the prototype without const came from seemingly erroneous man pages. --- src/ldso/dynlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ldso/dynlink.c') diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index 27d92f2b..89e1260b 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -1331,7 +1331,7 @@ failed: return 0; } -int __dladdr(void *addr, Dl_info *info) +int __dladdr(const void *addr, Dl_info *info) { struct dso *p; Sym *sym; @@ -1441,7 +1441,7 @@ void *__dlsym(void *restrict p, const char *restrict s, void *restrict ra) { return 0; } -int __dladdr (void *addr, Dl_info *info) +int __dladdr (const void *addr, Dl_info *info) { return 0; } -- cgit v1.2.1