diff options
Diffstat (limited to 'libavformat/network.h')
-rw-r--r-- | libavformat/network.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/libavformat/network.h b/libavformat/network.h index d890e7c060..33cd517b51 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -27,26 +27,27 @@ #include "libavutil/error.h" #include "os_support.h" +#if HAVE_UNISTD_H +#include <unistd.h> +#endif + #if HAVE_WINSOCK2_H #include <winsock2.h> #include <ws2tcpip.h> -#ifdef EPROTONOSUPPORT -# undef EPROTONOSUPPORT -#endif +#ifndef EPROTONOSUPPORT #define EPROTONOSUPPORT WSAEPROTONOSUPPORT -#ifdef ETIMEDOUT -# undef ETIMEDOUT #endif +#ifndef ETIMEDOUT #define ETIMEDOUT WSAETIMEDOUT -#ifdef ECONNREFUSED -# undef ECONNREFUSED #endif +#ifndef ECONNREFUSED #define ECONNREFUSED WSAECONNREFUSED -#ifdef EINPROGRESS -# undef EINPROGRESS #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) |