mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-03 18:20:29 +01:00
build: add --disable-crashtrace option
Disables GNU backtrace extensions.
This commit is contained in:
parent
5bbafdc632
commit
bcef119ffd
2 changed files with 13 additions and 1 deletions
|
|
@ -611,6 +611,13 @@ fi
|
|||
AC_DEFINE_UNQUOTED(KERNEL_FIRMWARE_DIR, "$KERNEL_FIRMWARE_DIR", [Define to path of the kernel firmware directory])
|
||||
AC_SUBST(KERNEL_FIRMWARE_DIR)
|
||||
|
||||
AC_ARG_ENABLE(crashtrace,
|
||||
AS_HELP_STRING([--disable-crashtrace], [Disable GNU backtrace extensions]),
|
||||
[enable_crashtrace=${enableval}], [enable_crashtrace=yes])
|
||||
if test x"$enable_crashtrace" = xyes; then
|
||||
AC_DEFINE(ENABLE_CRASHTRACE, 1, [Define if you have GNU backtrace extensions])
|
||||
fi
|
||||
|
||||
NM_COMPILER_WARNINGS
|
||||
|
||||
GTK_DOC_CHECK(1.0)
|
||||
|
|
|
|||
|
|
@ -30,10 +30,13 @@
|
|||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/stat.h>
|
||||
#include <execinfo.h>
|
||||
#include <strings.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef ENABLE_CRASHTRACE
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include "nm-logging.h"
|
||||
|
|
@ -262,6 +265,7 @@ _nm_log (const char *loc,
|
|||
static void
|
||||
fallback_get_backtrace (void)
|
||||
{
|
||||
#ifdef ENABLE_CRASHTRACE
|
||||
void *frames[64];
|
||||
Dl_info info;
|
||||
size_t size;
|
||||
|
|
@ -289,6 +293,7 @@ fallback_get_backtrace (void)
|
|||
}
|
||||
}
|
||||
syslog (LOG_CRIT, "******************* END **********************************");
|
||||
#endif /* ENABLE_CRASHTRACE */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue