[PATCH] Build problem in current portable CVS

Corinna Vinschen vinschen at redhat.com
Mon Feb 18 22:55:54 EST 2008


Hi,

I just tried to build the latest portable code from CVS on Cygwin.
I stumbled over a problem with the definitions of gai_strerror and
ssh_gai_strerror.

On systems not having gai_strerror, the fake-rfc2553.c file defines
its own version of gai_strerror, and fake-rfc2553.h additionally has
this definition of gai_strerror:

#define gai_strerror(a)         (ssh_gai_strerror(a))

OTOH, misc.c defines the function ssh_gai_strerror unconditionally,
and ssh_gai_strerror is used throughout the ssh sources.  Since the
ssh_gai_strerror implementation in misc.c special cases EAI_SYSTEM,
and since it calls gai_strerror, the above define appears to be wrong.
Patch below.


Thanks,
Corinna



Index: openbsd-compat/fake-rfc2553.h
===================================================================
RCS file: /cvs/openssh/openbsd-compat/fake-rfc2553.h,v
retrieving revision 1.13
diff -p -u -r1.13 fake-rfc2553.h
--- openbsd-compat/fake-rfc2553.h       24 Jul 2006 03:51:52 -0000      1.13
+++ openbsd-compat/fake-rfc2553.h       18 Feb 2008 11:44:01 -0000
@@ -152,7 +152,6 @@ int getaddrinfo(const char *, const char
 #endif /* !HAVE_GETADDRINFO */
 
 #if !defined(HAVE_GAI_STRERROR) && !defined(HAVE_CONST_GAI_STRERROR_PROTO)
-#define gai_strerror(a)                (ssh_gai_strerror(a))
 char *gai_strerror(int);
 #endif /* !HAVE_GAI_STRERROR */


-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


More information about the openssh-unix-dev mailing list