In socket ioctl(), properly call fcntl-F_SETFL with the new flags.

This commit is contained in:
yellows8 2018-03-20 22:49:52 -04:00
parent 21d27b935e
commit 51293c7fb0

View File

@ -553,7 +553,7 @@ int ioctl(int fd, int request, ...) {
if(flags == -1) if(flags == -1)
return -1; return -1;
flags = *(int *)data != 0 ? (flags | O_NONBLOCK) : (flags & ~O_NONBLOCK); flags = *(int *)data != 0 ? (flags | O_NONBLOCK) : (flags & ~O_NONBLOCK);
return fcntl(fd, F_SETFL, 0); return fcntl(fd, F_SETFL, flags);
} }
case BIOCSETF: case BIOCSETF:
case BIOCSETWF: case BIOCSETWF: