cpython: Issue #25171: Fix compilation issue on OpenBSD in random.c

https://hg.python.org/cpython/rev/e4ac5a899657 changeset: 98441:e4ac5a899657 user: Victor Stinner <victor.stinner@gmail.com> date: Wed Sep 30 22:06:51 2015 +0200 summary: Issue #25171: Fix compilation issue on OpenBSD in random.c Patch written by Remi Pointel. files: Python/random.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Python/random.c b/Python/random.c --- a/Python/random.c +++ b/Python/random.c @@ -364,7 +364,7 @@ #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 @@ 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 @@ CryptReleaseContext(hCryptProv, 0); hCryptProv = 0; } -#elif PY_GETENTROPY +#elif defined(PY_GETENTROPY) /* nothing to clean */ #else dev_urandom_close(); -- Repository URL: https://hg.python.org/cpython
participants (1)
-
victor.stinner