# HG changeset patch # User Derek R. Price # Date 1126535104 0 # Node ID ee77add4f8391a57964dc1f50dc65a20f400293f # Parent 43c8e8a95c2dd245da974da7c22bfea60c6eb8f5 * gai_strerror.c: Include config.h when available. Include getaddrinfo.h before other headers to test interface. Reported by Larry Jones . diff --git a/lib/ChangeLog b/lib/ChangeLog --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2005-09-12 Derek Price + + * gai_strerror.c: Include config.h when available. Include + getaddrinfo.h before other headers to test interface. + Reported by Larry Jones . + 2005-09-08 Paul Eggert * glob.c (glob, globfree, __glob_pattern_p): Use old-style function diff --git a/lib/gai_strerror.c b/lib/gai_strerror.c --- a/lib/gai_strerror.c +++ b/lib/gai_strerror.c @@ -16,13 +16,20 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifndef _LIBC +# include "getaddrinfo.h" +#endif + #include #include #ifdef _LIBC # include #else -# include "getaddrinfo.h" # include "gettext.h" # define _(String) gettext (String) # define N_(String) String