30 lines
970 B
Diff
30 lines
970 B
Diff
|
Use the generic sigemptyset() available on both, glibc and musl libc
|
||
|
The SA_INTERRUPT is not defined in musl libc. Copy the (unused?)
|
||
|
definition from glibc's header bits/sigaction.h
|
||
|
|
||
|
--- src/prog/gpm-root.y 2012-10-26 23:21:38.000000000 +0200
|
||
|
+++ src/prog/gpm-root.y 2015-06-22 15:56:19.167982843 +0200
|
||
|
@@ -56,6 +56,9 @@
|
||
|
#define minor(dev) ((dev)&0xff)
|
||
|
#endif
|
||
|
|
||
|
+#if !defined(SA_INTERRUPT)
|
||
|
+# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
|
||
|
+#endif
|
||
|
|
||
|
#define GPM_NULL_DEV "/dev/null"
|
||
|
|
||
|
@@ -1196,11 +1199,7 @@
|
||
|
LOG_DAEMON : LOG_USER);
|
||
|
/* reap your zombies */
|
||
|
childaction.sa_handler=reap_children;
|
||
|
-#if defined(__GLIBC__)
|
||
|
- __sigemptyset(&childaction.sa_mask);
|
||
|
-#else /* __GLIBC__ */
|
||
|
- childaction.sa_mask=0;
|
||
|
-#endif /* __GLIBC__ */
|
||
|
+ sigemptyset(&childaction.sa_mask);
|
||
|
childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */
|
||
|
sigaction(SIGCHLD,&childaction,NULL);
|
||
|
|