Skip to content

Commit cbdc9ba

Browse files
thierrybareaperhulk
authored andcommitted
OpenSSL 1.0.2o has switched to winsock2 (#4184)
So here we need to make sure we don't simply include windows but only the parts that we want
1 parent d57c79e commit cbdc9ba

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/_cffi_src/openssl/callbacks.py

+3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
#include <openssl/crypto.h>
1212
1313
#ifdef _WIN32
14+
#define WIN32_LEAN_AND_MEAN
1415
#include <Windows.h>
16+
#include <Wincrypt.h>
17+
#include <Winsock2.h>
1518
#else
1619
#include <stdio.h>
1720
#include <stdlib.h>

src/_cffi_src/openssl/cryptography.py

+3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
#include <openssl/e_os2.h>
2323
#endif
2424
#if defined(_WIN32)
25+
#define WIN32_LEAN_AND_MEAN
2526
#include <windows.h>
27+
#include <Wincrypt.h>
28+
#include <Winsock2.h>
2629
#endif
2730
2831
#define CRYPTOGRAPHY_OPENSSL_102_OR_GREATER \

0 commit comments

Comments
 (0)