Make the FIONBIO ioctl actually work. (#441)

The fcntl needs the original `sockfd`, not the remapped one.
This commit is contained in:
Patrik Rak 2020-04-15 10:09:17 +02:00 committed by GitHub
parent 8566366b02
commit 6bca5af849
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,9 +11,9 @@ int ioctl(int sockfd, int request, ...)
int *value;
va_list ap;
sockfd = soc_get_fd(sockfd);
if(sockfd < 0) {
errno = -sockfd;
ret = soc_get_fd(sockfd);
if(ret < 0) {
errno = -ret;
return -1;
}