Commit c41e0aed authored by wm4's avatar wm4 Committed by Michael Niedermayer

network: prevent SIGPIPE on OSX

OSX does not know MSG_NOSIGNAL, and provides its own non-standard
mechanism instead. I guess Apple hates standards.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e9d646f4
......@@ -180,6 +180,10 @@ int ff_socket(int af, int type, int proto)
}
#endif
}
#ifdef SO_NOSIGPIPE
if (fd != -1)
setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &(int){1}, sizeof(int));
#endif
return fd;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment