Skip to content

Commit

Permalink
configure: Fix type of argument to backtrace_symbols
Browse files Browse the repository at this point in the history
The backtrace_symbols function expects a pointer to an array of
void * values, not a pointer to an array of a single element.
Removing the address operator ensures that the right type is used.

This avoids an unconditional failure of this probe with compilers
that treat incompatible pointer types as a compilation error.
  • Loading branch information
fweimer-rh authored and alandekok committed Dec 19, 2023
1 parent a57e25b commit 61a1d95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -14418,7 +14418,7 @@ main (void)
{
void *sym[1];
backtrace_symbols(&sym, sizeof(sym))
backtrace_symbols(sym, sizeof(sym))
;
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2163,7 +2163,7 @@ if test "x$ac_cv_header_execinfo_h" = "xyes"; then
#include <execinfo.h>
]], [[
void *sym[1];
backtrace_symbols(&sym, sizeof(sym)) ]])],[
backtrace_symbols(sym, sizeof(sym)) ]])],[
AC_MSG_RESULT(yes)
ac_cv_lib_execinfo_backtrace_symbols="yes"
],[
Expand Down

0 comments on commit 61a1d95

Please sign in to comment.