problems with 3.7.1p1 on IRIX (again)

Albert Chin openssh-unix-dev at thewrittenword.com
Thu Sep 18 01:02:16 EST 2003


On Wed, Sep 17, 2003 at 01:59:46PM +0100, Victoria Pennington wrote:
> I've seen a few messages re. problems with 3.7.1p1 on IRIX 6.5...
> I'm using 6.5.19 and having no trouble compiling, installing and
> starting, but sshd just closes the connection with no explanation.
> debug/verbose modes don't seem to give any clues.
> 
> Darren Tucker suggested defining BROKEN_GETADDRINFO in config.h,
> but I find that compilation then fails (assuming I've implemented this
> right).
> 
> Has anyone had any success yet?

I use the following patch for IRIX. Rerun autoconf and autoheader.

-- 
albert chin (china at thewrittenword.com)

-- snip snip
--- configure.ac.orig	Tue Sep 16 09:39:55 2003
+++ configure.ac	Wed Sep 17 09:22:03 2003
@@ -198,6 +178,10 @@
 	AC_DEFINE(WITH_IRIX_AUDIT)
 	AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
 	AC_DEFINE(BROKEN_INET_NTOA)
+	AC_DEFINE(BROKEN_GETADDRINFO)
+	AC_DEFINE(SETEUID_BREAKS_SETUID)
+	AC_DEFINE(BROKEN_SETREUID)
+	AC_DEFINE(BROKEN_SETREGID)
 	AC_DEFINE(WITH_ABBREV_NO_TTY)
 	AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
 	;;
@@ -714,7 +699,7 @@
 AC_CHECK_FUNCS(\
 	arc4random __b64_ntop b64_ntop __b64_pton b64_pton basename \
 	bcopy bindresvport_sa clock fchmod fchown freeaddrinfo futimes \
-	gai_strerror getaddrinfo getcwd getgrouplist getnameinfo getopt \
+	getaddrinfo getcwd getgrouplist getnameinfo getopt \
 	getpeereid _getpty getrlimit getttyent glob inet_aton \
 	inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \
 	mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \
@@ -725,6 +710,21 @@
 	strlcat strlcpy strmode strnvis sysconf tcgetpgrp \
 	truncate utimes vhangup vsnprintf waitpid \
 )
+
+# IRIX has a const char return value for gai_strerror()
+AC_CHECK_FUNCS(gai_strerror,[
+	AC_DEFINE(HAVE_GAI_STRERROR)
+	AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+const char *gai_strerror(int);],[
+char *str;
+
+str = gai_strerror(0);],[
+		AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1,
+		[Define if gai_strerror() returns const char *])])])
 
 AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP))
 
--- openbsd-compat/fake-rfc2553.h.orig	Wed Sep 17 05:45:58 2003
+++ openbsd-compat/fake-rfc2553.h	Wed Sep 17 08:55:52 2003
@@ -137,7 +137,7 @@
     const struct addrinfo *, struct addrinfo **);
 #endif /* !HAVE_GETADDRINFO */
 
-#ifndef HAVE_GAI_STRERROR
+#if !defined(HAVE_GAI_STRERROR) && !defined(HAVE_CONST_GAI_STRERROR_PROTO)
 char *gai_strerror(int);
 #endif /* !HAVE_GAI_STRERROR */
 
--- openbsd-compat/fake-rfc2553.c.orig	Wed Sep 17 05:46:02 2003
+++ openbsd-compat/fake-rfc2553.c	Wed Sep 17 08:55:11 2003
@@ -77,7 +77,11 @@
 #endif /* !HAVE_GETNAMEINFO */
 
 #ifndef HAVE_GAI_STRERROR
+#ifdef HAVE_CONST_GAI_STRERROR_PROTO
+const char *
+#else
 char *
+#endif
 gai_strerror(int err)
 {
 	switch (err) {




More information about the openssh-unix-dev mailing list