From: Stig Venaas Date: Fri, 12 Jul 2002 15:36:33 +0000 (+0000) Subject: Use AF_INET instead of AF_UNSPEC when IPv6 disabled X-Git-Tag: NO_SLAP_OP_BLOCKS~1368 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bf5e3a15ca52a00a1437c9f8f7f26deb449f7a6f;p=openldap Use AF_INET instead of AF_UNSPEC when IPv6 disabled --- 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;