mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-27 01:11:33 +02:00
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
commit 9b66298a4262bfd90f3701c7f48c9dcf7a157cac
|
|
Author: Isaac Dunham <ibid.ag@gmail.com>
|
|
Date: Thu Feb 11 16:54:32 2016 -0800
|
|
|
|
make gpm-root build
|
|
|
|
* use sigemptyset() instead of nonportable equivalents
|
|
* if SA_INTERRUPT is undefined, set sa_flags to 0 because the implementation
|
|
defaults to interrupt mode (thanks to nsz for pointing out missing
|
|
initialization)
|
|
|
|
diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y
|
|
index 069d801..ed363f4 100644
|
|
--- a/src/prog/gpm-root.y
|
|
+++ b/src/prog/gpm-root.y
|
|
@@ -76,6 +76,10 @@
|
|
#undef YYDEBUG
|
|
#endif
|
|
|
|
+#ifndef SA_INTERRUPT
|
|
+#define SA_INTERRUPT 0
|
|
+#endif
|
|
+
|
|
#define USER_CFG ".gpm-root"
|
|
#define SYSTEM_CFG SYSCONFDIR "/gpm-root.conf"
|
|
|
|
@@ -1196,11 +1200,7 @@ int main(int argc, char **argv)
|
|
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);
|
|
|