mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 04:32:37 +01:00
build: check for existence of execinfo.h
GLIBC is not necessarily the only library that provides execinfo. With libexecinfo execinfo can be used also in other Libraries. The patch lets the configure check the existence of the header and the libexecinfo Library and uses them if avaible. (also fixes compilation if execinfo is not avaible)
This commit is contained in:
parent
37173350e2
commit
3b4c1dd4d3
@ -86,6 +86,9 @@ AC_DEFINE_UNQUOTED(CONFIGDIR, "/etc/iwd", [Configuration directory])
|
||||
|
||||
AC_CHECK_HEADERS(linux/types.h linux/if_alg.h)
|
||||
|
||||
AC_CHECK_HEADERS_ONCE(execinfo.h)
|
||||
AC_CHECK_LIB(execinfo, backtrace)
|
||||
|
||||
if (test "${enable_client}" != "no"); then
|
||||
AC_CHECK_HEADERS(readline/readline.h, enable_readline=yes,
|
||||
AC_MSG_ERROR(readline header files are required))
|
||||
|
@ -653,7 +653,9 @@ static void parse_modem(const char *path, struct l_dbus_message_iter *props)
|
||||
* has been seen to happen.
|
||||
*/
|
||||
l_error("modem %s already found", path);
|
||||
#ifdef HAVE_EXECINFO_H
|
||||
__iwd_backtrace_print(2);
|
||||
#endif
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <features.h>
|
||||
|
||||
#ifdef __GLIBC__
|
||||
#ifdef HAVE_EXECINFO_H
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
Loading…
Reference in New Issue
Block a user