diff --git a/include/haproxy/tools.h b/include/haproxy/tools.h index 2b003e418..0cf605352 100644 --- a/include/haproxy/tools.h +++ b/include/haproxy/tools.h @@ -996,7 +996,7 @@ int dump_text_line(struct buffer *out, const char *buf, int bsize, int len, void dump_addr_and_bytes(struct buffer *buf, const char *pfx, const void *addr, int n); void dump_hex(struct buffer *out, const char *pfx, const void *buf, int len, int unsafe); int may_access(const void *ptr); -void *resolve_sym_name(struct buffer *buf, const char *pfx, void *addr); +const void *resolve_sym_name(struct buffer *buf, const char *pfx, void *addr); const char *get_exec_path(); #if defined(USE_BACKTRACE) diff --git a/src/debug.c b/src/debug.c index e1a07f0a6..e173f4277 100644 --- a/src/debug.c +++ b/src/debug.c @@ -98,7 +98,7 @@ void ha_thread_dump(struct buffer *buf, int thr, int calling_tid) struct buffer bak; void *callers[100]; int j, nptrs; - void *addr; + const void *addr; int dump = 0; nptrs = my_backtrace(callers, sizeof(callers)/sizeof(*callers)); diff --git a/src/tools.c b/src/tools.c index fa92db58b..39a4538bc 100644 --- a/src/tools.c +++ b/src/tools.c @@ -4426,7 +4426,7 @@ static int dladdr_and_size(const void *addr, Dl_info *dli, size_t *size) * The symbol's base address is returned, or NULL when unresolved, in order to * allow the caller to match it against known ones. */ -void *resolve_sym_name(struct buffer *buf, const char *pfx, void *addr) +const void *resolve_sym_name(struct buffer *buf, const char *pfx, void *addr) { const struct { const void *func;