summaryrefslogtreecommitdiffstats
path: root/main/xautolock/processwait.patch
blob: 8a8509a6b7739cfe9931face972b181135441036 (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
--- src/engine.c.orig  2014-08-28 12:50:56.086307943 +0000
+++ src/engine.c   2014-08-28 12:50:59.496333650 +0000
@@ -209,24 +209,24 @@ evaluateTriggers (Display* d)
   {
 #else /* VMS */
   if (lockerPid)
   {
-#if !defined (UTEKV) && !defined (SYSV) && !defined (SVR4)
+#if (!defined (UTEKV) && !defined (SYSV) && !defined (SVR4)) && defined (__GLIBC__)
     union wait  status;      /* childs process status */
-#else /* !UTEKV && !SYSV && !SVR4 */
+#else /* (!UTEKV && !SYSV && !SVR4) && __GLIBC__ */
     int         status = 0;  /* childs process status */
-#endif /* !UTEKV && !SYSV && !SVR4 */
+#endif /* (!UTEKV && !SYSV && !SVR4) && __GLIBC__ */
 
     if (unlockNow && !disabled)
     {
       (void) kill (lockerPid, SIGTERM);
     }
 
-#if !defined (UTEKV) && !defined (SYSV) && !defined (SVR4)
+#if (!defined (UTEKV) && !defined (SYSV) && !defined (SVR4)) && defined (__GLIBC__)
     if (wait3 (&status, WNOHANG, 0))
-#else /* !UTEKV && !SYSV && !SVR4 */
+#else /* (!UTEKV && !SYSV && !SVR4) && __GLIBC__ */
     if (waitpid (-1, &status, WNOHANG)) 
-#endif /* !UTEKV && !SYSV && !SVR4 */
+#endif /* (!UTEKV && !SYSV && !SVR4) && __GLIBC__ */
     {
      /*
       *  If the locker exited normally, we disable any pending kill
       *  trigger. Otherwise, we assume that it either has crashed or