--- ./clients/olwm/olwm.c.orig	Tue Jun 29 07:11:52 1993
+++ ./clients/olwm/olwm.c	Sat Apr  1 18:26:06 2000
@@ -23,6 +23,10 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 
+#ifndef MAXPID
+#define MAXPID 30000
+#endif
+
 #include <X11/Xos.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -622,13 +626,19 @@ handleChildSignal()
 void
 ReapChildren()
 {
-#ifdef SYSV
+#if defined(SYSV)
         pid_t pid;
         int status;
 #else
+#if (defined(BSD) && (BSD >= 199103))
+	pid_t pid;
+	int status;
+	int oldmask;
+#else   
 	int oldmask;
 	int pid;
 	union wait status;
+#endif
 #endif
 
 	if (!deadChildren)
