From d21f8815a11972b804a776b4201dc4867bf8ce4c Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 19 Mar 2019 08:43:53 -0400 Subject: Try to use getrandom even in manylinux1 wheels (#4816) * Try to use getrandom even in manylinux1 wheels * typo --- src/_cffi_src/openssl/src/osrandom_engine.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/_cffi_src') 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 */ -- cgit v1.2.3