You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user