--- clients/olwm/olwm.c.orig	1993-06-29 07:11:52.000000000 +0200
+++ clients/olwm/olwm.c	2003-12-30 01:31:15.000000000 +0100
@@ -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,14 +626,20 @@ 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)
 		return;
