summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-02-16 06:05:10 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-02-16 06:05:10 (GMT)
commite8d750c05bba752215d842968dae24c151df561e (patch)
tree9e30a575eb1d2cf9e69834a7ded49c52bd701a24 /Python
parent66a9b72c38e62308c0bf380baa1fe6a803cca338 (diff)
downloadcpython-e8d750c05bba752215d842968dae24c151df561e.zip
cpython-e8d750c05bba752215d842968dae24c151df561e.tar.gz
cpython-e8d750c05bba752215d842968dae24c151df561e.tar.bz2
Issue #23115: Fixed compilation on OpenBSD (Py_MIN is not defined in 2.7).
Diffstat (limited to 'Python')
-rw-r--r--Python/random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/random.c b/Python/random.c
index d10dda9..da49bba 100644
--- a/Python/random.c
+++ b/Python/random.c
@@ -102,7 +102,7 @@ static int
py_getentropy(unsigned char *buffer, Py_ssize_t size, int fatal)
{
while (size > 0) {
- Py_ssize_t len = Py_MIN(size, 256);
+ Py_ssize_t len = size < 256 ? size : 256;
int res = getentropy(buffer, len);
if (res < 0) {
if (fatal) {