aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lxdm/lxdm-execinfo.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/lxdm/lxdm-execinfo.patch')
-rw-r--r--testing/lxdm/lxdm-execinfo.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/testing/lxdm/lxdm-execinfo.patch b/testing/lxdm/lxdm-execinfo.patch
new file mode 100644
index 0000000000..b81ef2fc84
--- /dev/null
+++ b/testing/lxdm/lxdm-execinfo.patch
@@ -0,0 +1,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)