summaryrefslogtreecommitdiff
path: root/libavformat/network.h
diff options
context:
space:
mode:
authorRémi Denis-Courmont <remi@remlab.net>2014-08-20 23:06:07 +0300
committerMartin Storsjö <martin@martin.st>2014-08-25 10:49:14 +0300
commit6ee1cb5740e7490151db7dcec7e20ceaf8a2fe1f (patch)
treee6971b95e3a5073be0a3a27c2e7f4ba70daa3d3e /libavformat/network.h
parentb263f8ffe7599d9cd27ec477a12700da8eb2790d (diff)
libavformat: use MSG_NOSIGNAL when applicable
If the remote end of a connection oriented socket hangs up, generating an EPIPE error is preferable over an unhandled SIGPIPE signal. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/network.h')
-rw-r--r--libavformat/network.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/network.h b/libavformat/network.h
index 9d8c92fb83..09cee58a5c 100644
--- a/libavformat/network.h
+++ b/libavformat/network.h
@@ -98,6 +98,10 @@ struct sockaddr_storage {
};
#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
+#ifndef MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0
+#endif
+
#if !HAVE_STRUCT_ADDRINFO
struct addrinfo {
int ai_flags;