mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
Merge pull request #9123 from sepalani/bsd-socket-crash
Socket: Set SO_NOSIGPIPE on macOS
This commit is contained in:
commit
56e8058a06
@ -648,6 +648,12 @@ s32 WiiSockMan::AddSocket(s32 fd, bool is_rw)
|
||||
WiiSocket& sock = WiiSockets[wii_fd];
|
||||
sock.SetFd(fd);
|
||||
sock.SetWiiFd(wii_fd);
|
||||
|
||||
#ifdef __APPLE__
|
||||
int opt_no_sigpipe = 1;
|
||||
if (setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &opt_no_sigpipe, sizeof(opt_no_sigpipe)) < 0)
|
||||
ERROR_LOG(IOS_NET, "Failed to set SO_NOSIGPIPE on socket");
|
||||
#endif
|
||||
}
|
||||
|
||||
SetLastNetError(wii_fd);
|
||||
|
Loading…
Reference in New Issue
Block a user