- Fixes for SunOS 4.1.4 from Gordon Atwood <gordon@cs.ualberta.ca>
   - Include floatingpoint.h for entropy.c
   - strerror replacement
diff --git a/ChangeLog b/ChangeLog
index 2b3cd0b..df4c735 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-20000713
+20000715
  - (djm) OpenBSD CVS updates
    - provos@cvs.openbsd.org  2000/07/13 16:53:22
      [aux.c readconf.c servconf.c ssh.h]
@@ -16,6 +16,9 @@
    - djm@cvs.openbsd.org     2000/07/14 22:01:38
      [ssh-keygen.c ssh.c]
      Always create ~/.ssh with mode 700; ok Markus
+ - Fixes for SunOS 4.1.4 from Gordon Atwood <gordon@cs.ualberta.ca>
+   - Include floatingpoint.h for entropy.c
+   - strerror replacement
 
 20000712
  - (djm) Remove -lresolve for Reliant Unix
diff --git a/acconfig.h b/acconfig.h
index 4528be6..358390b 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -6,6 +6,9 @@
 
 @TOP@
 
+/* Define if your system defines sys_errlist[] */
+#undef HAVE_SYS_ERRLIST
+
 /* Define if your system choked on IP TOS setting */
 #undef IP_TOS_IS_BROKEN
 
diff --git a/bsd-misc.c b/bsd-misc.c
index c22cde3..e6b529e 100644
--- a/bsd-misc.c
+++ b/bsd-misc.c
@@ -157,3 +157,10 @@
 	return(setreuid(-1,euid));
 }
 #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */
+
+#if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST)
+const char *strerror(void)
+{
+	return(sys_errlist[errno]);
+}
+#endif /* !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) */
diff --git a/bsd-misc.h b/bsd-misc.h
index cdf8e2b..76b4e1a 100644
--- a/bsd-misc.h
+++ b/bsd-misc.h
@@ -58,4 +58,8 @@
 int seteuid(uid_t euid);
 #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */
 
+#if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST)
+const char *strerror(void);
+#endif /* !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) */
+
 #endif /* _BSD_MISC_H */
diff --git a/configure.in b/configure.in
index 0b8047a..9265985 100644
--- a/configure.in
+++ b/configure.in
@@ -216,10 +216,10 @@
 fi
 
 # Checks for header files.
-AC_CHECK_HEADERS(bstring.h endian.h lastlog.h limits.h login.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h time.h usersec.h util.h utmp.h utmpx.h)
+AC_CHECK_HEADERS(bstring.h endian.h floatingpoint.h lastlog.h limits.h login.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h time.h usersec.h util.h utmp.h utmpx.h)
 
 # Checks for library functions.
-AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock freeaddrinfo gai_strerror getaddrinfo getnameinfo getrusage inet_aton innetgr md5_crypt memmove mkdtemp on_exit openpty rresvport_af setenv seteuid setlogin setproctitle setreuid sigaction sigvec snprintf strlcat strlcpy strsep vsnprintf vhangup _getpty __b64_ntop)
+AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock freeaddrinfo gai_strerror getaddrinfo getnameinfo getrusage inet_aton innetgr md5_crypt memmove mkdtemp on_exit openpty rresvport_af setenv seteuid setlogin setproctitle setreuid sigaction sigvec snprintf strerror strlcat strlcpy strsep vsnprintf vhangup _getpty __b64_ntop)
 dnl    checks for time functions
 AC_CHECK_FUNCS(gettimeofday time)
 dnl    checks for libutil functions
@@ -724,6 +724,18 @@
 fi
 
 
+AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
+	AC_TRY_LINK([], 
+		[ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);], 
+		[ ac_cv_libc_defines_sys_errlist="yes" ],
+		[ ac_cv_libc_defines_sys_errlist="no" ]
+	)
+])
+if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
+	AC_DEFINE(HAVE_SYS_ERRLIST)
+fi
+
+
 # Looking for programs, paths and files
 AC_ARG_WITH(rsh,
 	[  --with-rsh=PATH         Specify path to remote shell program ],
diff --git a/entropy.c b/entropy.c
index 8427609..aa62650 100644
--- a/entropy.c
+++ b/entropy.c
@@ -35,7 +35,12 @@
 #include <openssl/rand.h>
 #include <openssl/sha.h>
 
-RCSID("$Id: entropy.c,v 1.17 2000/07/09 12:42:33 djm Exp $");
+/* SunOS 4.4.4 needs this */
+#ifdef HAVE_FLOATINGPOINT_H
+# include <floatingpoint.h>
+#endif /* HAVE_FLOATINGPOINT_H */
+
+RCSID("$Id: entropy.c,v 1.18 2000/07/15 04:59:15 djm Exp $");
 
 #ifndef offsetof
 # define offsetof(type, member) ((size_t) &((type *)0)->member)
diff --git a/ssh_prng_cmds.in b/ssh_prng_cmds.in
index df45ed2..d7389d7 100644
--- a/ssh_prng_cmds.in
+++ b/ssh_prng_cmds.in
@@ -15,6 +15,7 @@
 "netstat -an"				@PROG_NETSTAT@	0.05
 "netstat -in"				@PROG_NETSTAT@	0.05
 "netstat -rn"				@PROG_NETSTAT@	0.02
+"netstat -pn"				@PROG_NETSTAT@	0.02
 "netstat -s"				@PROG_NETSTAT@	0.02
 
 "arp -a -n"				@PROG_ARP@	0.02