-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathopenldap.patch
65 lines (60 loc) · 1.95 KB
/
openldap.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
include/ac/socket.h | 9 +++++++++
include/ldap_cdefs.h | 6 ++++++
libraries/liblber/nt_err.c | 2 +-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/include/ac/socket.h b/include/ac/socket.h
index 417119a..2ddcb65 100644
--- a/include/ac/socket.h
+++ b/include/ac/socket.h
@@ -98,9 +98,18 @@
# define tcp_close( s ) closesocket( s )
# endif
+#ifdef EWOULDBLOCK
+#undef EWOULDBLOCK
#define EWOULDBLOCK WSAEWOULDBLOCK
+#endif
+#ifdef EINPROGRESS
+#undef EINPROGRESS
#define EINPROGRESS WSAEINPROGRESS
+#endif
+#ifdef ETIMEDOUT
+#undef ETIMEDOUT
#define ETIMEDOUT WSAETIMEDOUT
+#endif
#undef sock_errno
#undef sock_errstr
diff --git a/include/ldap_cdefs.h b/include/ldap_cdefs.h
index 79823d2..ac78a70 100644
--- a/include/ldap_cdefs.h
+++ b/include/ldap_cdefs.h
@@ -132,6 +132,9 @@
(!defined(LDAP_LIBS_DYNAMIC) && defined(SLAPD_IMPORT)))
# define LBER_F(type) extern __declspec(dllimport) type
# define LBER_V(type) extern __declspec(dllimport) type
+#elif defined LBER_DLL_LIB
+# define LBER_F(type) __declspec(dllexport) type
+# define LBER_V(type) __declspec(dllexport) type
#else
# define LBER_F(type) extern type
# define LBER_V(type) extern type
@@ -143,6 +146,9 @@
(!defined(LDAP_LIBS_DYNAMIC) && defined(SLAPD_IMPORT)))
# define LDAP_F(type) extern __declspec(dllimport) type
# define LDAP_V(type) extern __declspec(dllimport) type
+#elif defined (LDAP_EXPORT)
+# define LDAP_F(type) __declspec(dllexport) type
+# define LDAP_V(type) __declspec(dllexport) type
#else
# define LDAP_F(type) extern type
# define LDAP_V(type) extern type
diff --git a/libraries/liblber/nt_err.c b/libraries/liblber/nt_err.c
index 08d708e..cf974a3 100644
--- a/libraries/liblber/nt_err.c
+++ b/libraries/liblber/nt_err.c
@@ -23,7 +23,7 @@
#define LBER_RETSTR( x ) case x: return #x;
-char *ber_pvt_wsa_err2string( int err )
+LBER_F( char * ) ber_pvt_wsa_err2string( int err )
{
switch( err ) {
LBER_RETSTR( WSAEINTR )