- (dtucker) [configure.ac openbsd-compat/fake-rfc2553.c
openbsd-compat/fake-rfc2553.h] Bug #659: Test for and handle systems with
where gai_strerror is defined as "const char *". Part of patch supplied
by bugzilla-openssh at thewrittenword.com
diff --git a/openbsd-compat/fake-rfc2553.c b/openbsd-compat/fake-rfc2553.c
index f449248..0186b53 100644
--- a/openbsd-compat/fake-rfc2553.c
+++ b/openbsd-compat/fake-rfc2553.c
@@ -37,7 +37,7 @@
#include "includes.h"
-RCSID("$Id: fake-rfc2553.c,v 1.4 2003/06/13 22:43:23 djm Exp $");
+RCSID("$Id: fake-rfc2553.c,v 1.5 2003/09/22 02:08:23 dtucker Exp $");
#ifndef HAVE_GETNAMEINFO
int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
@@ -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) {
diff --git a/openbsd-compat/fake-rfc2553.h b/openbsd-compat/fake-rfc2553.h
index b70b928..bf727ce 100644
--- a/openbsd-compat/fake-rfc2553.h
+++ b/openbsd-compat/fake-rfc2553.h
@@ -1,4 +1,4 @@
-/* $Id: fake-rfc2553.h,v 1.6 2003/08/29 16:59:52 mouring Exp $ */
+/* $Id: fake-rfc2553.h,v 1.7 2003/09/22 02:08:23 dtucker Exp $ */
/*
* Copyright (C) 2000-2003 Damien Miller. All rights reserved.
@@ -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 */