Define the WEXITSTATUS macro for systems that don't have it.
authorDavid Dykstra <dwd@samba.org>
Wed, 29 Dec 1999 21:11:57 +0000 (21:11 +0000)
committerDavid Dykstra <dwd@samba.org>
Wed, 29 Dec 1999 21:11:57 +0000 (21:11 +0000)
util.c

diff --git a/util.c b/util.c
index 3cb80eb..f67dff0 100644 (file)
--- a/util.c
+++ b/util.c
@@ -874,6 +874,9 @@ char *timestring(time_t t)
 /****************************************************************************
  like waitpid but does the WEXITSTATUS
 ****************************************************************************/
+#ifndef WEXITSTATUS
+#define        WEXITSTATUS(stat)       ((int)(((stat)>>8)&0xFF))
+#endif
 void wait_process(pid_t pid, int *status)
 {
        waitpid(pid, status, 0);