diff options
Diffstat (limited to 'lib/replace')
-rw-r--r-- | lib/replace/libreplace_network.m4 | 19 | ||||
-rw-r--r-- | lib/replace/system/kerberos.h | 14 | ||||
-rw-r--r-- | lib/replace/system/network.h | 2 |
3 files changed, 30 insertions, 5 deletions
diff --git a/lib/replace/libreplace_network.m4 b/lib/replace/libreplace_network.m4 index f9bca40ce9..eadcc6bfc1 100644 --- a/lib/replace/libreplace_network.m4 +++ b/lib/replace/libreplace_network.m4 @@ -240,12 +240,25 @@ if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then { struct addrinfo hints = {0,}; struct addrinfo *ppres; - const char hostname[] = "0.0.0.0"; + const char hostname1[] = "0.0.0.0"; + const char hostname2[] = "127.0.0.1"; + const char hostname3[] = "::"; hints.ai_socktype = SOCK_STREAM; - hints.ai_family = AF_INET; + hints.ai_family = AF_UNSPEC; hints.ai_flags = AI_NUMERICHOST|AI_PASSIVE|AI_ADDRCONFIG; - return getaddrinfo(hostname, NULL, &hints, &ppres) != 0 ? 1 : 0; + /* Test for broken flag combination on AIX. */ + if (getaddrinfo(hostname1, NULL, &hints, &ppres) == EAI_BADFLAGS) { + /* This fails on an IPv6-only box, but not with + the EAI_BADFLAGS error. */ + return 1; + } + if (getaddrinfo(hostname2, NULL, &hints, &ppres) == 0) { + /* IPv4 lookup works - good enough. */ + return 0; + } + /* Uh-oh, no IPv4. Are we IPv6-only ? */ + return getaddrinfo(hostname3, NULL, &hints, &ppres) != 0 ? 1 : 0; }], libreplace_cv_HAVE_GETADDRINFO=yes, libreplace_cv_HAVE_GETADDRINFO=no) diff --git a/lib/replace/system/kerberos.h b/lib/replace/system/kerberos.h index bb1f1b9a09..7762d4be46 100644 --- a/lib/replace/system/kerberos.h +++ b/lib/replace/system/kerberos.h @@ -37,5 +37,19 @@ #include <com_err.h> #endif +#ifdef HAVE_GSSAPI_GSSAPI_EXT_H +#include <gssapi/gssapi_ext.h> +#elif HAVE_GSSAPI_GSSAPI_H +#include <gssapi/gssapi.h> +#elif HAVE_GSSAPI_GSSAPI_GENERIC_H +#include <gssapi/gssapi_generic.h> +#elif HAVE_GSSAPI_H +#include <gssapi.h> +#endif + +#if HAVE_GSSAPI_GSSAPI_KRB5_H +#include <gssapi/gssapi_krb5.h> +#endif + #endif #endif diff --git a/lib/replace/system/network.h b/lib/replace/system/network.h index f7c1bcfacb..a4e6a7e31a 100644 --- a/lib/replace/system/network.h +++ b/lib/replace/system/network.h @@ -331,8 +331,6 @@ typedef unsigned short int sa_family_t; * which might return 512 or bigger */ # define IOV_MAX 512 -# else -# error IOV_MAX and UIO_MAXIOV undefined # endif # endif #endif |