Skip to content

Commit bbb0e6a

Browse files
committed
Fix build issues with last commit.
1 parent 992d5f5 commit bbb0e6a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Modules/posixmodule.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11452,8 +11452,9 @@ os_readinto_impl(PyObject *module, int fd, Py_buffer *buffer)
1145211452
/*[clinic end generated code: output=8091a3513c683a80 input=810c820f4d9b1c6b]*/
1145311453
{
1145411454
if (buffer->len < 0) {
11455-
errno = EINVAL
11456-
return posix_error();
11455+
errno = EINVAL;
11456+
PyErr_SetFromErrno(PyExc_OSError);
11457+
return -1;
1145711458
}
1145811459
return _Py_read(fd, buffer->buf, buffer->len);
1145911460
}

0 commit comments

Comments
 (0)