mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
network: fix fcntl cmds
F_SETFL/F_GETFL are the correct commands to set a socket to be non-blocking
This commit is contained in:
parent
42d8e08f78
commit
652e5e3df0
1 changed files with 2 additions and 2 deletions
|
@ -182,7 +182,7 @@ linger MakeLinger(bool enable, u32 linger_value) {
|
|||
}
|
||||
|
||||
bool EnableNonBlock(int fd, bool enable) {
|
||||
int flags = fcntl(fd, F_GETFD);
|
||||
int flags = fcntl(fd, F_GETFL);
|
||||
if (flags == -1) {
|
||||
return false;
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ bool EnableNonBlock(int fd, bool enable) {
|
|||
} else {
|
||||
flags &= ~O_NONBLOCK;
|
||||
}
|
||||
return fcntl(fd, F_SETFD, flags) == 0;
|
||||
return fcntl(fd, F_SETFL, flags) == 0;
|
||||
}
|
||||
|
||||
Errno TranslateNativeError(int e) {
|
||||
|
|
Loading…
Reference in a new issue