Skip to content

Commit

Permalink
Define WIN32_LEAN_AND_MEAN in Rust side
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Dec 28, 2021
1 parent 0604d80 commit 50a751a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/_cffi_src/openssl/cryptography.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
#include <openssl/e_os2.h>
#endif
#if defined(_WIN32)
#if !defined(WIN32_LEAN_AND_MEAN)
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <Wincrypt.h>
#include <Winsock2.h>
Expand Down
4 changes: 4 additions & 0 deletions src/rust/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ fn main() {
// build.define("Py_LIMITED_API", "0x030600f0");
}

if cfg!(windows) {
build.define("WIN32_LEAN_AND_MEAN", None);
}

build.compile("_openssl.a");
}

Expand Down

0 comments on commit 50a751a

Please sign in to comment.