mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
bpo-41462: Add os.set_blocking() support for VxWorks RTOS (GH-21713)
This commit is contained in:
parent
b63a620014
commit
06afac6c57
2 changed files with 4 additions and 1 deletions
|
@ -2070,7 +2070,9 @@ _Py_get_blocking(int fd)
|
|||
int
|
||||
_Py_set_blocking(int fd, int blocking)
|
||||
{
|
||||
#if defined(HAVE_SYS_IOCTL_H) && defined(FIONBIO)
|
||||
/* bpo-41462: On VxWorks, ioctl(FIONBIO) only works on sockets.
|
||||
Use fcntl() instead. */
|
||||
#if defined(HAVE_SYS_IOCTL_H) && defined(FIONBIO) && !defined(__VXWORKS__)
|
||||
int arg = !blocking;
|
||||
if (ioctl(fd, FIONBIO, &arg) < 0)
|
||||
goto error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue