diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-09-30 20:06:51 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-09-30 20:06:51 (GMT) |
commit | c51d244fc922610ee58e30dbd99d8d42f32d061b (patch) | |
tree | 57eec2b2ddba93f8ac9e0764c0e00b9c18634211 /Python | |
parent | d69dd8bd5e81b94b326aeb6fc4d33fb57395d840 (diff) | |
download | cpython-c51d244fc922610ee58e30dbd99d8d42f32d061b.zip cpython-c51d244fc922610ee58e30dbd99d8d42f32d061b.tar.gz cpython-c51d244fc922610ee58e30dbd99d8d42f32d061b.tar.bz2 |
Issue #25171: Fix compilation issue on OpenBSD in random.c
Patch written by Remi Pointel.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/random.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/random.c b/Python/random.c index 8f3e6d6..8caaa95 100644 --- a/Python/random.c +++ b/Python/random.c @@ -364,7 +364,7 @@ _PyOS_URandom(void *buffer, Py_ssize_t size) #ifdef MS_WINDOWS return win32_urandom((unsigned char *)buffer, size, 1); -#elif PY_GETENTROPY +#elif defined(PY_GETENTROPY) return py_getentropy(buffer, size, 0); #else return dev_urandom_python((char*)buffer, size); @@ -411,7 +411,7 @@ _PyRandom_Init(void) else { #ifdef MS_WINDOWS (void)win32_urandom(secret, secret_size, 0); -#elif PY_GETENTROPY +#elif defined(PY_GETENTROPY) (void)py_getentropy(secret, secret_size, 1); #else dev_urandom_noraise(secret, secret_size); @@ -427,7 +427,7 @@ _PyRandom_Fini(void) CryptReleaseContext(hCryptProv, 0); hCryptProv = 0; } -#elif PY_GETENTROPY +#elif defined(PY_GETENTROPY) /* nothing to clean */ #else dev_urandom_close(); |