diff options
author | pxinwr <peixing.xin@windriver.com> | 2020-12-07 20:41:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 20:41:12 (GMT) |
commit | 06afac6c5740bb81d2b7ab9639d2b08cccf77d33 (patch) | |
tree | 43364ecb6ed608bc20e9d551733e33634f21edd2 /Python | |
parent | b63a620014b67a6e63d10783149c41baaf59def8 (diff) | |
download | cpython-06afac6c5740bb81d2b7ab9639d2b08cccf77d33.zip cpython-06afac6c5740bb81d2b7ab9639d2b08cccf77d33.tar.gz cpython-06afac6c5740bb81d2b7ab9639d2b08cccf77d33.tar.bz2 |
bpo-41462: Add os.set_blocking() support for VxWorks RTOS (GH-21713)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/fileutils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/fileutils.c b/Python/fileutils.c index b589d73..ac38282 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -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; |