aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.c
diff options
context:
space:
mode:
authormingw-san <mingw-san>2010-07-26 15:05:11 -0400
committerNick Mathewson <nickm@torproject.org>2010-11-23 12:47:38 -0500
commit78df6404eb8d28843c7943341a4d4602c6f8d2bb (patch)
treeaf03751cf0255adc7b2358f384a6b3deb9757d6c /src/common/tortls.c
parentff014eb5ea738b8dd9f5c8dc802593f3add73536 (diff)
downloadtor-78df6404eb8d28843c7943341a4d4602c6f8d2bb.tar
tor-78df6404eb8d28843c7943341a4d4602c6f8d2bb.tar.gz
Fix compilation with mingw and OpenSSL 0.9.8m+
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r--src/common/tortls.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 2915f7919..4d11d6d7f 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -17,6 +17,17 @@
#include "orconfig.h"
#include <assert.h>
+#ifdef MS_WINDOWS /*wrkard for dtls1.h >= 0.9.8m of "#include <winsock.h>"*/
+ #define WIN32_WINNT 0x400
+ #define _WIN32_WINNT 0x400
+ #define WIN32_LEAN_AND_MEAN
+ #if defined(_MSC_VER) && (_MSC_VER < 1300)
+ #include <winsock.h>
+ #else
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif
+#endif
#include <openssl/ssl.h>
#include <openssl/ssl3.h>
#include <openssl/err.h>