Bug 501 - -current broken on AIX: conflicting types for gai_strerror
Summary: -current broken on AIX: conflicting types for gai_strerror
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Miscellaneous (show other bugs)
Version: -current
Hardware: Other AIX
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-22 16:28 AEDT by Darren Tucker
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments
Define gai_strerror as "char *" as per RFC2133 (1.20 KB, patch)
2003-02-22 16:30 AEDT, Darren Tucker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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