From bf5e3a15ca52a00a1437c9f8f7f26deb449f7a6f Mon Sep 17 00:00:00 2001 From: Stig Venaas Date: Fri, 12 Jul 2002 15:36:33 +0000 Subject: [PATCH] Use AF_INET instead of AF_UNSPEC when IPv6 disabled --- libraries/libldap/os-ip.c | 4 ++++ servers/slapd/daemon.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index 61f8a7c0ab..d8a6039978 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -31,7 +31,11 @@ int ldap_int_tblsize = 0; #if defined( HAVE_GETADDRINFO ) && defined( HAVE_INET_NTOP ) +# ifdef LDAP_PF_INET6 int ldap_int_inet4or6 = AF_UNSPEC; +# else +int ldap_int_inet4or6 = AF_INET; +# endif #endif /* diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index dcddb01a8e..4c297f52d1 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -33,7 +33,11 @@ int deny_severity = LOG_NOTICE; #define LDAPI_MOD_URLEXT "x-mod" #endif /* LDAP_PF_LOCAL */ +#ifdef LDAP_PF_INET6 int slap_inet4or6 = AF_UNSPEC; +#else +int slap_inet4or6 = AF_INET; +#endif /* globals */ time_t starttime; -- 2.39.5