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.
This commit is contained in:
Rich Felker
2014-01-06 22:03:38 -05:00
parent 1e7a581ad6
commit 839cc4e6da
3 changed files with 5 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ typedef struct {
const char *dli_sname;
void *dli_saddr;
} Dl_info;
int dladdr(void *, Dl_info *);
int dladdr(const void *, Dl_info *);
int dlinfo(void *, int, void *);
#endif