blob: b81ef2fc847892ee0b8b6ae180963e5ff4ecb232 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
--- lxdm-0.3.0/configure.ac
+++ lxdm-0.3.0.mod/configure.ac
@@ -23,7 +23,7 @@
# Checks for header files.
AC_PATH_X
-AC_CHECK_HEADERS([shadow.h stdlib.h string.h unistd.h])
+AC_CHECK_HEADERS([shadow.h stdlib.h string.h unistd.h execinfo.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
Only in lxdm-0.3.0: data/LoginReady
Only in lxdm-0.3.0: data/PostLogin
Only in lxdm-0.3.0: data/PostLogout
Only in lxdm-0.3.0: data/PreLogin
Only in lxdm-0.3.0: data/PreReboot
Only in lxdm-0.3.0: data/PreShutdown
--- lxdm-0.3.0/src/lxdm.c
+++ lxdm-0.3.0.mod/src/lxdm.c
@@ -51,7 +51,9 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
+#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
+#endif
#include <utmp.h>
@@ -1480,6 +1482,7 @@
static void log_sigsegv(void)
{
+#ifdef HAVE_EXECINFO_H
void *array[40];
size_t size;
char **bt_strs;
@@ -1492,6 +1495,9 @@
fprintf(stderr, "%s\n", bt_strs[i]);
free(bt_strs);
+#else
+ fprintf(stderr, "backtrace is unavailable\n");
+#endif
}
static void sigsegv_handler(int sig)
|