Skip to content

Commit e8d750c

Browse files
Issue #23115: Fixed compilation on OpenBSD (Py_MIN is not defined in 2.7).
1 parent 66a9b72 commit e8d750c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/random.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static int
102102
py_getentropy(unsigned char *buffer, Py_ssize_t size, int fatal)
103103
{
104104
while (size > 0) {
105-
Py_ssize_t len = Py_MIN(size, 256);
105+
Py_ssize_t len = size < 256 ? size : 256;
106106
int res = getentropy(buffer, len);
107107
if (res < 0) {
108108
if (fatal) {

0 commit comments

Comments
 (0)