From 23b048e3c1e3334dc0f65f075df05008d005c6fd Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 30 Oct 2000 19:13:40 +0000 Subject: [PATCH] Add gai_strerror detection and replacement function prototype --- include/ac/socket.h | 9 +++++++++ include/portable.h.in | 3 +++ 2 files changed, 12 insertions(+) diff --git a/include/ac/socket.h b/include/ac/socket.h index e48dcb8f84..26af7a571a 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -193,4 +193,13 @@ LDAP_F (int) ldap_pvt_inet_aton LDAP_P(( const char *, struct in_addr * )); # define INET6_ADDRSTRLEN 46 #endif +#ifdef HAVE_GETADDRINFO +# ifdef HAVE_GAI_STRERROR +# define AC_GAI_STRERROR(x) (gai_strerror((x))) +# else +# define AC_GAI_STRERROR(x) (ldap_pvt_gai_strerror((x))) + char * ldap_pvt_gai_strerror( int ); +# endif +#endif + #endif /* _AC_SOCKET_H_ */ diff --git a/include/portable.h.in b/include/portable.h.in index 59fef45f52..6b1ed017e2 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -144,6 +144,9 @@ /* Define if you have the flock function. */ #undef HAVE_FLOCK +/* Define if you have the gai_strerror function. */ +#undef HAVE_GAI_STRERROR + /* Define if you have the getaddrinfo function. */ #undef HAVE_GETADDRINFO -- 2.39.5