Bug 501

Summary: -current broken on AIX: conflicting types for gai_strerror
Product: Portable OpenSSH Reporter: Darren Tucker <dtucker>
Component: MiscellaneousAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED FIXED    
Severity: normal    
Priority: P2    
Version: -current   
Hardware: Other   
OS: AIX   
Attachments:
Description Flags
Define gai_strerror as "char *" as per RFC2133 none

Description Darren Tucker 2003-02-22 16:28:14 AEDT
Recent additions to fake-getaddrinfo cause compile errors on AIX.

The new code defines gai_strerror as returning "const char *".  AIX 4.3.3 
and 5.1 (and RFCs 2133 and 2553) define it returning "char *".

This mismatch causes the following error.  The definition of gai_strerror is 
buried in /usr/include/netdb.h, there doesn't seem to be any easy way of 
excluding it.

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´
Comment 1 Darren Tucker 2003-02-22 16:30:34 AEDT
Created attachment 236 [details]
Define gai_strerror as "char *" as per RFC2133
Comment 2 Damien Miller 2003-02-24 12:34:52 AEDT
Thanks, applied.

This slipped in when I made it compile under Linux/glibc (which seems to ignore
RFCs as a matter of whim) and I forgot to take the const back out.
Comment 3 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED