Skip to content
Snippets Groups Projects
Commit bbee3551 authored by Howard Chu's avatar Howard Chu
Browse files

Fix for Windows, don't call gethostbyname until WSAStartup has occurred.

parent 0e2af54a
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment