- Fix pointer issues in waitpid() and wait() replaces.  Patch by Lutz
   Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
diff --git a/ChangeLog b/ChangeLog
index f4244ca..20e4efb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 20010327
  - Attempt sync with sshlogin.c w/ OpenBSD (mainly CVS ID)
+ - Fix pointer issues in waitpid() and wait() replaces.  Patch by Lutz 
+   Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
 
 20010324
  - Fixed permissions ssh-keyscan.  Thanks to Christopher Linn <celinn@mtu.edu>.
@@ -4708,4 +4710,4 @@
  - Wrote replacements for strlcpy and mkdtemp
  - Released 1.0pre1
 
-$Id: ChangeLog,v 1.1016 2001/03/26 05:32:16 mouring Exp $
+$Id: ChangeLog,v 1.1017 2001/03/26 05:35:33 mouring Exp $
diff --git a/openbsd-compat/bsd-nextstep.c b/openbsd-compat/bsd-nextstep.c
index 64962d0..85b298a 100644
--- a/openbsd-compat/bsd-nextstep.c
+++ b/openbsd-compat/bsd-nextstep.c
@@ -22,7 +22,7 @@
 
 #include "includes.h"
 
-RCSID("$Id: bsd-nextstep.c,v 1.3 2001/02/09 01:55:36 djm Exp $");
+RCSID("$Id: bsd-nextstep.c,v 1.4 2001/03/26 05:35:34 mouring Exp $");
 
 #ifdef HAVE_NEXT
 #include <errno.h>
@@ -37,7 +37,8 @@
 
 	#undef wait			/* Use NeXT's wait() function */
 	wait_pid = wait(&statusp);
-	status = (int *) statusp.w_status;
+	if (status)
+		*status = (int) statusp.w_status;
 
 	return wait_pid;
 }
diff --git a/openbsd-compat/bsd-waitpid.c b/openbsd-compat/bsd-waitpid.c
index 1a96bbf..47b4446 100644
--- a/openbsd-compat/bsd-waitpid.c
+++ b/openbsd-compat/bsd-waitpid.c
@@ -22,7 +22,7 @@
 
 #include "includes.h"
 
-RCSID("$Id: bsd-waitpid.c,v 1.2 2001/02/09 01:55:36 djm Exp $");
+RCSID("$Id: bsd-waitpid.c,v 1.3 2001/03/26 05:35:34 mouring Exp $");
 
 #ifndef HAVE_WAITPID 
 #include <errno.h>
@@ -43,7 +43,9 @@
 		pid = 0;   /* wait4() wants pid=0 for indiscriminate wait. */
 	}
         wait_pid = wait4(pid, &statusp, options, NULL);
-        stat_loc = (int *)statusp.w_status;            
+	if (stat_loc)
+        	*stat_loc = (int) statusp.w_status;            
+
         return wait_pid;                               
 }