From e6d190c7dec535799c5b531b0f848c249b5080b0 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Mon, 23 Jul 2012 13:51:03 +0100 Subject: [PATCH] ITS#7332 Changes required to build with Microsoft Visual Studio --- include/ac/socket.h | 1 + libraries/libldap/ldap-int.h | 3 +++ libraries/libldap/util-int.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/include/ac/socket.h b/include/ac/socket.h index 6c1ebcdcea..f99da85e9a 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -62,6 +62,7 @@ #ifdef HAVE_WINSOCK2 #include +#include #elif HAVE_WINSOCK #include #endif diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index be824e4e82..4c4e47b8bb 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -45,6 +45,9 @@ /* for struct timeval */ #include +#ifdef _WIN32 +#include +#endif #undef TV2MILLISEC #define TV2MILLISEC(tv) (((tv)->tv_sec * 1000) + ((tv)->tv_usec/1000)) diff --git a/libraries/libldap/util-int.c b/libraries/libldap/util-int.c index 570b296c2e..3510aec93e 100644 --- a/libraries/libldap/util-int.c +++ b/libraries/libldap/util-int.c @@ -782,7 +782,9 @@ char *ldap_pvt_gai_strerror (int code) { { EAI_NONAME, N_("Name or service not known") }, { EAI_SERVICE, N_("Servname not supported for ai_socktype") }, { EAI_SOCKTYPE, N_("ai_socktype not supported") }, +#ifdef EAI_SYSTEM { EAI_SYSTEM, N_("System error") }, +#endif { 0, NULL } }; -- 2.39.5