aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2019-03-19 08:43:53 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2019-03-19 20:43:53 +0800
commitd21f8815a11972b804a776b4201dc4867bf8ce4c (patch)
tree989493a16551818b624cfa66ffceebab68b3f758 /src/_cffi_src
parent054f5791dd0b603bbaca028da48fff23930e0741 (diff)
downloadcryptography-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
Diffstat (limited to 'src/_cffi_src')
-rw-r--r--src/_cffi_src/openssl/src/osrandom_engine.h12
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 */