From 06afac6c5740bb81d2b7ab9639d2b08cccf77d33 Mon Sep 17 00:00:00 2001 From: pxinwr Date: Tue, 8 Dec 2020 04:41:12 +0800 Subject: bpo-41462: Add os.set_blocking() support for VxWorks RTOS (GH-21713) --- Python/fileutils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Python') diff --git a/Python/fileutils.c b/Python/fileutils.c index b589d7390d..ac38282117 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; -- cgit v1.2.1