From bbee3551b8f9cc15850d76f46ec668f7e3ed2b6f Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 4 Jan 2002 23:10:48 +0000 Subject: [PATCH] Fix for Windows, don't call gethostbyname until WSAStartup has occurred. --- libraries/libldap/init.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c index c167a00592..46f8f7768a 100644 --- a/libraries/libldap/init.c +++ b/libraries/libldap/init.c @@ -448,11 +448,6 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl ) ldap_int_error_init(); -#if defined(LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND) \ - || defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL) - ldap_int_hostname = ldap_pvt_get_fqdn( ldap_int_hostname ); -#endif - #ifdef HAVE_WINSOCK2 { WORD wVersionRequested; WSADATA wsaData; @@ -485,6 +480,11 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl ) return; } } +#endif + +#if defined(LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND) \ + || defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL) + ldap_int_hostname = ldap_pvt_get_fqdn( ldap_int_hostname ); #endif ldap_int_utils_init(); -- 2.39.5