Thread (76 messages) 76 messages, 3 authors, 2021-05-11

[PATCH] dladdr.3: SYNOPSIS: Add missing 'const'

From: Alejandro Colomar <hidden>
Date: 2021-05-09 21:44:04
Subsystem: the rest · Maintainer: Linus Torvalds

Glibc uses 'const' for the 1st parameter of these functions.
Fix the prototypes.

......

.../glibc$ grep_glibc_prototype dladdr
dlfcn/dlfcn.h:98:
extern int dladdr (const void *__address, Dl_info *__info)
     __THROW __nonnull ((2));
.../glibc$ grep_glibc_prototype dladdr1
dlfcn/dlfcn.h:102:
extern int dladdr1 (const void *__address, Dl_info *__info,
		    void **__extra_info, int __flags) __THROW __nonnull ((2));
.../glibc$

Signed-off-by: Alejandro Colomar <redacted>
---
 man3/dladdr.3 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/man3/dladdr.3 b/man3/dladdr.3
index 19944174b..c95df4e49 100644
--- a/man3/dladdr.3
+++ b/man3/dladdr.3
@@ -31,9 +31,9 @@ dladdr, dladdr1 \- translate address to symbolic information
 .B #define _GNU_SOURCE
 .B #include <dlfcn.h>
 .PP
-.BI "int dladdr(void *" addr ", Dl_info *" info );
-.BI "int dladdr1(void *" addr ", Dl_info *" info ", void **" \
-        extra_info ", int " flags );
+.BI "int dladdr(const void *" addr ", Dl_info *" info );
+.BI "int dladdr1(const void *" addr ", Dl_info *" info ", void **" extra_info ,
+.BI "            int " flags );
 .PP
 Link with \fI\-ldl\fP.
 .fi
-- 
2.31.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help