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/dladdr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ldso/dladdr.c') diff --git a/src/ldso/dladdr.c b/src/ldso/dladdr.c index 265bb681..7ca718f4 100644 --- a/src/ldso/dladdr.c +++ b/src/ldso/dladdr.c @@ -1,9 +1,9 @@ #define _GNU_SOURCE #include -int __dladdr(void *, Dl_info *); +int __dladdr(const void *, Dl_info *); -int dladdr(void *addr, Dl_info *info) +int dladdr(const void *addr, Dl_info *info) { return __dladdr(addr, info); } -- cgit v1.2.1