From: Serhiy Storchaka Date: Mon, 16 Feb 2015 06:05:10 +0000 (+0200) Subject: Issue #23115: Fixed compilation on OpenBSD (Py_MIN is not defined in 2.7). X-Git-Tag: v2.7.10rc1~169 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8d750c05bba752215d842968dae24c151df561e;p=thirdparty%2FPython%2Fcpython.git Issue #23115: Fixed compilation on OpenBSD (Py_MIN is not defined in 2.7). --- diff --git a/Python/random.c b/Python/random.c index d10dda9eca22..da49bbab5a46 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) {