diff options
| author | 2021-08-06 21:08:31 +0200 | |
|---|---|---|
| committer | 2021-08-06 21:08:31 +0200 | |
| commit | 652e5e3df0afabffe1ff0d61f475d847a1d7f6d6 (patch) | |
| tree | 85b72a561614189aa7c192f3739d043e187acf1c /src | |
| parent | Merge pull request #6822 from yzct12345/clion-assert (diff) | |
| download | yuzu-652e5e3df0afabffe1ff0d61f475d847a1d7f6d6.tar.gz yuzu-652e5e3df0afabffe1ff0d61f475d847a1d7f6d6.tar.xz yuzu-652e5e3df0afabffe1ff0d61f475d847a1d7f6d6.zip | |
network: fix fcntl cmds
F_SETFL/F_GETFL are the correct commands to set a socket to be non-blocking
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/network/network.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/network/network.cpp b/src/core/network/network.cpp index 375bc79ec..5dc9cdc14 100644 --- a/src/core/network/network.cpp +++ b/src/core/network/network.cpp | |||
| @@ -182,7 +182,7 @@ linger MakeLinger(bool enable, u32 linger_value) { | |||
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | bool EnableNonBlock(int fd, bool enable) { | 184 | bool EnableNonBlock(int fd, bool enable) { |
| 185 | int flags = fcntl(fd, F_GETFD); | 185 | int flags = fcntl(fd, F_GETFL); |
| 186 | if (flags == -1) { | 186 | if (flags == -1) { |
| 187 | return false; | 187 | return false; |
| 188 | } | 188 | } |
| @@ -191,7 +191,7 @@ bool EnableNonBlock(int fd, bool enable) { | |||
| 191 | } else { | 191 | } else { |
| 192 | flags &= ~O_NONBLOCK; | 192 | flags &= ~O_NONBLOCK; |
| 193 | } | 193 | } |
| 194 | return fcntl(fd, F_SETFD, flags) == 0; | 194 | return fcntl(fd, F_SETFL, flags) == 0; |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | Errno TranslateNativeError(int e) { | 197 | Errno TranslateNativeError(int e) { |