From 4b1b1449d95b3567d055fc410a1db137c811229c Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sat, 23 Jun 2012 15:00:17 +0300 Subject: network: Don't redefine error codes if they already exist in errno.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the errno.h values don't match the error codes that winsock returns, map the winsock error codes to the errno ones, to make sure explicit checks against AVERROR(x) match. Signed-off-by: Martin Storsjö --- libavformat/network.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libavformat/network.h') diff --git a/libavformat/network.h b/libavformat/network.h index 3e4422e4c2..793cfee9a9 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -35,10 +35,19 @@ #include #include +#ifndef EPROTONOSUPPORT #define EPROTONOSUPPORT WSAEPROTONOSUPPORT +#endif +#ifndef ETIMEDOUT #define ETIMEDOUT WSAETIMEDOUT +#endif +#ifndef ECONNREFUSED #define ECONNREFUSED WSAECONNREFUSED +#endif +#ifndef EINPROGRESS #define EINPROGRESS WSAEINPROGRESS +#endif + #define getsockopt(a, b, c, d, e) getsockopt(a, b, c, (char*) d, e) #define setsockopt(a, b, c, d, e) setsockopt(a, b, c, (const char*) d, e) -- cgit v1.2.3