Current CVS broken on AIX: conflicting types for `gai_strerror´

Darren Tucker dtucker at zip.com.au
Fri Feb 14 16:36:23 EST 2003


Hi All,
	After finding out my AIX boxes haven't been updating their tinderbox[0]
test trees (grr) and fixing that, I found that recent changes caused
build errors on AIX 4.3.3 & 5.1.  4.2.1 appears OK.

	The error is:

gcc -g -O2 -Wall -Wpointer-arith -Wno-uninitialized -I. -I..
-I../../openbsd-compat -I../../openbsd-compat/..
-I/usr/local/ssl/include  -I/usr/local/include -DHAVE_CONFIG_H -c
../../openbsd-compat/bsd-arc4random.c
In file included from ../../openbsd-compat/openbsd-compat.h:39,
	from ../../includes.h:169,
	from ../../openbsd-compat/bsd-arc4random.c:25:
	../../openbsd-compat/fake-getaddrinfo.h:40: conflicting types for
`gai_strerror´
	/usr/include/netdb.h:377: previous declaration of `gai_strerror´

	The fragment from fake-addrinfo.h is:
#ifndef HAVE_GAI_STRERROR
const char *gai_strerror(int ecode);
#endif /* !HAVE_GAI_STRERROR */

	Now on AIX (4.3.3 & 5.1, anyway), config.h defines HAVE_GAI_STRERROR,
however defines.h turns around an undefs it:

#if defined(BROKEN_GETADDRINFO) && defined(HAVE_GAI_STRERROR)
# undef HAVE_GAI_STRERROR
#endif

	Undef'ing BROKEN_GETADDRINFO in config.h seems to work OK in limited
testing on 4.3.3, however I don't know if there is a good reason for it
being there.  It seems there should be distinct HAVE_GAI_STRERROR and
USE_GAI_STRERROR defines.

	Comments anyone?

[0] http://dodgynet.dyndns.org/tinderbox/OpenSSH_Portable/status.html

-- 
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.




More information about the openssh-unix-dev mailing list