]> granicus.if.org Git - python/commitdiff
Issue #23115: Fixed compilation on OpenBSD (Py_MIN is not defined in 2.7).
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 16 Feb 2015 06:05:10 +0000 (08:05 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 16 Feb 2015 06:05:10 +0000 (08:05 +0200)
Python/random.c

index d10dda9eca22c51babb02be82bb884aea38f6ea5..da49bbab5a4662eb2487f2049b5eb6145d156c24 100644 (file)
@@ -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) {