- (bal) AIX 4.2.1 lacks nanosleep().  Patch to use nsleep() provided by
   dtucker@zip.com.au
diff --git a/ChangeLog b/ChangeLog
index 300552a..a6acb5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20030131
+ - (bal) AIX 4.2.1 lacks nanosleep().  Patch to use nsleep() provided by
+   dtucker@zip.com.au
+
 20030130
  - (djm) Unbreak root password auth. Spotted by dtucker@zip.com.au
 
@@ -1086,4 +1090,4 @@
      save auth method before monitor_reset_key_state(); bugzilla bug #284;
      ok provos@
 
-$Id: ChangeLog,v 1.2590 2003/01/29 23:20:56 djm Exp $
+$Id: ChangeLog,v 1.2591 2003/02/01 04:43:34 mouring Exp $
diff --git a/configure.ac b/configure.ac
index f66104e..608127f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.104 2003/01/28 00:33:44 djm Exp $
+# $Id: configure.ac,v 1.105 2003/02/01 04:43:34 mouring Exp $
 
 AC_INIT
 AC_CONFIG_SRCDIR([ssh.c])
@@ -388,7 +388,7 @@
 	rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
 	strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
 	sys/mman.h sys/pstat.h sys/select.h sys/stat.h \
-	sys/stropts.h sys/sysmacros.h sys/time.h \
+	sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h \
 	sys/un.h time.h tmpdir.h ttyent.h usersec.h \
 	util.h utime.h utmp.h utmpx.h)
 
@@ -604,8 +604,8 @@
 	clock fchmod fchown freeaddrinfo futimes gai_strerror \
 	getaddrinfo getcwd getgrouplist getnameinfo getopt getpeereid\
 	getrlimit getrusage getttyent glob inet_aton inet_ntoa \
-	inet_ntop innetgr login_getcapbool md5_crypt memmove \
-	mkdtemp mmap ngetaddrinfo openpty ogetaddrinfo pstat readpassphrase \
+	inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp \
+	mmap ngetaddrinfo nsleep openpty ogetaddrinfo pstat readpassphrase \
 	realpath recvmsg rresvport_af sendmsg setdtablesize setegid \
 	setenv seteuid setgroups setlogin setproctitle setresgid setreuid \
 	setrlimit setsid setpcred setvbuf sigaction sigvec snprintf \
diff --git a/openbsd-compat/port-aix.h b/openbsd-compat/port-aix.h
index 79570a2..4abe003 100644
--- a/openbsd-compat/port-aix.h
+++ b/openbsd-compat/port-aix.h
@@ -25,5 +25,16 @@
  */
 
 #ifdef _AIX
+
+/* AIX 4.2.x doesn't have nanosleep but does have nsleep which is equivalent */
+#if !defined(HAVE_NANOSLEEP) && defined(HAVE_NSLEEP)
+# define nanosleep(a,b) nsleep(a,b)
+#endif
+
+/* For struct timespec on AIX 4.2.x */
+#ifdef HAVE_SYS_TIMERS_H
+# include <sys/timers.h>
+#endif
+
 void aix_usrinfo(struct passwd *pw);
 #endif /* _AIX */