aboutsummaryrefslogtreecommitdiff
path: root/src/common/aes.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-05-14 13:04:13 -0400
committerNick Mathewson <nickm@torproject.org>2012-05-14 13:04:13 -0400
commit7134be06379f2a964c0a84ecb7ac002f59ea3214 (patch)
treea5dcf9771481c60affdb8c87105c11a2af984b3c /src/common/aes.c
parent02d206a58b04fc783fe0fd79d063ad74193aac83 (diff)
downloadtor-7134be06379f2a964c0a84ecb7ac002f59ea3214.tar.gz
tor-7134be06379f2a964c0a84ecb7ac002f59ea3214.zip
MSVC build issue: add magic to make openssl headers in aes.c work
Diffstat (limited to 'src/common/aes.c')
-rw-r--r--src/common/aes.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/common/aes.c b/src/common/aes.c
index c6bc2a821e..a9a018851b 100644
--- a/src/common/aes.c
+++ b/src/common/aes.c
@@ -10,6 +10,23 @@
**/
#include "orconfig.h"
+
+#ifdef _WIN32 /*wrkard for dtls1.h >= 0.9.8m of "#include <winsock.h>"*/
+ #ifndef WIN32_WINNT
+ #define WIN32_WINNT 0x400
+ #endif
+ #ifndef _WIN32_WINNT
+ #define _WIN32_WINNT 0x400
+ #endif
+ #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/opensslv.h>
#include <assert.h>
#include <stdlib.h>