aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/gpm/03-gpmroot.patch
blob: bbfdfc70284a9a9c63150cf96bb8d0017f6c828c (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
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);