]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/nt_err.c
Fix ldaps / TLS processing...
[openldap] / libraries / liblutil / nt_err.c
index 6d119d2b3d7f48094f0f37626d4f8c2c5da480fc..691c19caa61f89497d582de5c115c90c69c5ae67 100644 (file)
@@ -1,8 +1,13 @@
 /* $OpenLDAP$ */
 #include "portable.h"
 
+#include <windows.h>
+
 #ifdef HAVE_WINSOCK2
 #include <winsock2.h>
+#elif HAVE_WINSOCK
+#include <winsock.h>
+#endif /* HAVE_WINSOCK(2) */
 
 #define __RETSTR( x ) case x: return #x;
 
@@ -57,6 +62,8 @@ char *WSAGetErrorString( int err )
                __RETSTR( WSAVERNOTSUPPORTED )
                __RETSTR( WSANOTINITIALISED )
                __RETSTR( WSAEDISCON )
+
+#ifdef HAVE_WINSOCK2
                __RETSTR( WSAENOMORE )
                __RETSTR( WSAECANCELLED )
                __RETSTR( WSAEINVALIDPROCTABLE )
@@ -67,6 +74,7 @@ char *WSAGetErrorString( int err )
                __RETSTR( WSA_E_NO_MORE )
                __RETSTR( WSA_E_CANCELLED )
                __RETSTR( WSAEREFUSED )
+#endif // HAVE_WINSOCK2        
 
                __RETSTR( WSAHOST_NOT_FOUND )
                __RETSTR( WSATRY_AGAIN )
@@ -83,9 +91,6 @@ char *WSAGetLastErrorString( void )
 
 #undef __RETSTR
 
-#endif /* HAVE_WINSOCK2 */
-
-
 char *GetErrorString( int err )
 {
        static char msgBuf[1024];