]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/network.h
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavformat / network.h
index 191c00891f77ea27cfbb942172fdc83cd95161fe..33cd517b51b1be7684026d58363b3a77c878db52 100644 (file)
 #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)
 
 int ff_neterrno(void);
 #else