Make the FIONBIO ioctl actually work.
The fcntl needs the original `sockfd`, not the remapped one.
This commit is contained in:
parent
8acc1871bc
commit
1eebce1c2b
@ -11,9 +11,9 @@ int ioctl(int sockfd, int request, ...)
|
|||||||
int *value;
|
int *value;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
sockfd = soc_get_fd(sockfd);
|
ret = soc_get_fd(sockfd);
|
||||||
if(sockfd < 0) {
|
if(ret < 0) {
|
||||||
errno = -sockfd;
|
errno = -ret;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user