summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Paul Calderone <exarkun@divmod.com>2011-04-14 21:47:46 -0400
committerJean-Paul Calderone <exarkun@divmod.com>2011-04-14 21:47:46 -0400
commit70ceff0122f2737afa250d5d3ba3ed289bc1b5a7 (patch)
treed09810a41748638ac33692f43c30c4f2617bca53
parent1c198f90be456ae30bfead7baf06a6257252f9d2 (diff)
parent7301d8c77a05b9280e8cc82cfcc0139c0da16f45 (diff)
downloadpyopenssl-70ceff0122f2737afa250d5d3ba3ed289bc1b5a7.tar.gz
Apply winsock header hack/fix
-rw-r--r--OpenSSL/crypto/crypto.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSSL/crypto/crypto.h b/OpenSSL/crypto/crypto.h
index 8c803a8..adb6509 100644
--- a/OpenSSL/crypto/crypto.h
+++ b/OpenSSL/crypto/crypto.h
@@ -14,6 +14,19 @@
#define PyOpenSSL_CRYPTO_H_
#include <Python.h>
+/* Work around a bug in OpenSSL 1.0.0 which is caused by winsock.h being
+ included (from dtls1.h) too late by the OpenSSL header files, overriding
+ the fixes (in ossl_typ.h) for symbol clashes caused by this OS header
+ file.
+
+ In order to have those fixes still take effect, we include winsock.h
+ here, prior to including any OpenSSL header files.
+
+ */
+#ifdef _WIN32
+# include "winsock.h"
+#endif
+
#include "x509.h"
#include "x509name.h"
#include "netscape_spki.h"