On Mon, Feb 18, 2008 at 12:55:54PM +0100, Corinna Vinschen
wrote:> 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))
What moron put that there? oh wait, it was me :-)
Actually it's been there for a while and there's a reason for it: it
prevents name clash problems with Heimdal's libroken.
Unfortunately, when I added that helper function to the OpenBSD version,
I picked the same name, thus the problem.
Just removing it will reintroduce the libroken problem, but changing the
name should sort both out. I'm about to commit the following which should
do the job.
Thanks.
Index: openbsd-compat/fake-rfc2553.h
==================================================================RCS file:
/var/cvs/openssh/openbsd-compat/fake-rfc2553.h,v
retrieving revision 1.13
diff -u -p -r1.13 fake-rfc2553.h
--- openbsd-compat/fake-rfc2553.h 24 Jul 2006 03:51:52 -0000 1.13
+++ openbsd-compat/fake-rfc2553.h 25 Feb 2008 09:11:43 -0000
@@ -152,7 +152,7 @@ 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))
+#define gai_strerror(a) (_ssh_compat_gai_strerror(a))
char *gai_strerror(int);
#endif /* !HAVE_GAI_STRERROR */
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.