]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/network.h
network: Use SOCK_CLOEXEC when available
[ffmpeg] / libavformat / network.h
index 673427ab660dcb0833ab0960d3e0b7d6a9071018..99d96afda9893b328d8a1530620fdd21d2b10f96 100644 (file)
@@ -244,4 +244,15 @@ int ff_listen_connect(int fd, const struct sockaddr *addr,
                       socklen_t addrlen, int timeout,
                       URLContext *h);
 
+int ff_http_match_no_proxy(const char *no_proxy, const char *hostname);
+
+#ifndef SOCK_CLOEXEC
+#define SOCK_CLOEXEC 0
+#endif
+
+static inline int ff_socket(int domain, int type, int protocol)
+{
+    return socket(domain, type | SOCK_CLOEXEC, protocol);
+}
+
 #endif /* AVFORMAT_NETWORK_H */