void-packages/srcpkgs/lxdm/patches/execinfo.patch
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

47 lines
1,009 B
Diff

--- a/configure.ac 2011-11-16 22:27:33.624019150 +0100
+++ b/configure.ac 2011-11-16 22:29:49.537310486 +0100
@@ -23,7 +23,7 @@
# Checks for header files.
AC_PATH_X
-AC_CHECK_HEADERS([shadow.h stdlib.h string.h unistd.h utmpx.h])
+AC_CHECK_HEADERS([shadow.h stdlib.h string.h unistd.h utmpx.h, execinfo.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
--- a/src/lxdm.c 2011-11-16 22:27:33.617019240 +0100
+++ b/src/lxdm.c 2011-11-16 22:29:19.030694008 +0100
@@ -52,7 +52,9 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
+#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
+#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
@@ -1576,6 +1578,7 @@
return success;;
}
+#ifdef HAVE_EXECINFO_H
static void log_sigsegv(void)
{
void *array[40];
@@ -1591,12 +1594,15 @@
free(bt_strs);
}
+#endif
static void sigsegv_handler(int sig)
{
switch(sig){
case SIGSEGV:
+#ifdef HAVE_EXECINFO_H
log_sigsegv();
+#endif
lxdm_quit_self(0);
break;
default: