From: Ken Raeburn Date: Tue, 4 Jun 2002 21:17:06 +0000 (+0000) Subject: * fake-addrinfo.h [COPY_FIRST_CANONNAME]: Include string.h X-Git-Tag: krb5-1.3-alpha1~735 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3f8af67edf1ec832ae48c3496dc7827c98a74beb;p=krb5.git * fake-addrinfo.h [COPY_FIRST_CANONNAME]: Include string.h git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14471 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 0872f7104..ba1fbf6f1 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,5 +1,7 @@ 2002-06-04 Ken Raeburn + * fake-addrinfo.h [COPY_FIRST_CANONNAME]: Include string.h. + * k5-int.h (struct addrlist): Field "addrs" now points to addrinfo instead of sockaddr. diff --git a/src/include/fake-addrinfo.h b/src/include/fake-addrinfo.h index 9173bf5ad..5003becd2 100644 --- a/src/include/fake-addrinfo.h +++ b/src/include/fake-addrinfo.h @@ -119,6 +119,14 @@ gai_strerror (int code) /*@*/; /* # define WRAP_GETNAMEINFO */ #endif +#ifdef __linux__ +# define COPY_FIRST_CANONNAME +#endif + +#ifdef COPY_FIRST_CANONNAME +# include +#endif + #ifdef _WIN32 #define HAVE_GETADDRINFO #define HAVE_GETNAMEINFO @@ -765,7 +773,6 @@ getaddrinfo (const char *name, const char *serv, const struct addrinfo *hint, if (aierr || *result == 0) return aierr; -#ifdef __linux__ /* Linux libc version 6 (libc-2.2.4.so on Debian) is broken. RFC 2553 says that when AI_CANONNAME is set, the ai_canonname @@ -797,7 +804,7 @@ getaddrinfo (const char *name, const char *serv, const struct addrinfo *hint, for at configure time. Always do it on Linux for now. When they get around to fixing it, add a compile-time or run-time check for the glibc version in use. */ -#define COPY_FIRST_CANONNAME +#ifdef COPY_FIRST_CANONNAME if (/* name && hint && (hint->ai_flags & AI_CANONNAME) */ (*result)->ai_canonname) { struct hostent *hp; const char *name2 = 0;