diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2019-03-19 08:43:53 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2019-03-19 20:43:53 +0800 |
commit | d21f8815a11972b804a776b4201dc4867bf8ce4c (patch) | |
tree | 989493a16551818b624cfa66ffceebab68b3f758 | |
parent | 054f5791dd0b603bbaca028da48fff23930e0741 (diff) | |
download | cryptography-d21f8815a11972b804a776b4201dc4867bf8ce4c.tar.gz cryptography-d21f8815a11972b804a776b4201dc4867bf8ce4c.tar.bz2 cryptography-d21f8815a11972b804a776b4201dc4867bf8ce4c.zip |
Try to use getrandom even in manylinux1 wheels (#4816)
* Try to use getrandom even in manylinux1 wheels
* typo
-rw-r--r-- | src/_cffi_src/openssl/src/osrandom_engine.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/src/osrandom_engine.h b/src/_cffi_src/openssl/src/osrandom_engine.h index 7a48787d..cf394f22 100644 --- a/src/_cffi_src/openssl/src/osrandom_engine.h +++ b/src/_cffi_src/openssl/src/osrandom_engine.h @@ -26,6 +26,18 @@ #ifndef GRND_NONBLOCK #define GRND_NONBLOCK 0x0001 #endif /* GRND_NONBLOCK */ + + #ifndef SYS_getrandom + /* We only bother to define the constants for platforms where we ship + * wheels, since that's the predominant way you get a situation where + * you don't have SYS_getrandom at compile time but do have the syscall + * at runtime */ + #if defined __x86_64__ + #define SYS_getrandom 318 + #elif defined(__i386__) + #define SYS_getrandom 355 + #endif + #endif #endif /* __linux__ */ #endif /* _WIN32 */ |