[FFmpeg-cvslog] Remove some warnings when compiling with mingw (mingw-w64, 32 bits)

Vincent Torri git at videolan.org
Fri Feb 3 20:06:33 CET 2012


ffmpeg | branch: master | Vincent Torri <vincent_dot_torri_at_gmail_dot_com> | Sun Jan 29 10:45:22 2012 +0100| [ed3c0fe85dd5c228e98126b18e50ffb617e77070] | committer: Michael Niedermayer

Remove some warnings when compiling with mingw (mingw-w64, 32 bits)

Reviewed-by: Ramiro Polla <ramiro.polla at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ed3c0fe85dd5c228e98126b18e50ffb617e77070
---

 libavformat/network.h    |   12 ++++++++++++
 libavformat/os_support.h |    3 +++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/libavformat/network.h b/libavformat/network.h
index 9f7b782..191c008 100644
--- a/libavformat/network.h
+++ b/libavformat/network.h
@@ -31,9 +31,21 @@
 #include <winsock2.h>
 #include <ws2tcpip.h>
 
+#ifdef EPROTONOSUPPORT
+# undef EPROTONOSUPPORT
+#endif
 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
+#ifdef ETIMEDOUT
+# undef ETIMEDOUT
+#endif
 #define ETIMEDOUT       WSAETIMEDOUT
+#ifdef ECONNREFUSED
+# undef ECONNREFUSED
+#endif
 #define ECONNREFUSED    WSAECONNREFUSED
+#ifdef EINPROGRESS
+# undef EINPROGRESS
+#endif
 #define EINPROGRESS     WSAEINPROGRESS
 
 int ff_neterrno(void);
diff --git a/libavformat/os_support.h b/libavformat/os_support.h
index fca5b2a..159d4d7 100644
--- a/libavformat/os_support.h
+++ b/libavformat/os_support.h
@@ -31,6 +31,9 @@
 
 #if defined(__MINGW32__) && !defined(__MINGW32CE__)
 #  include <fcntl.h>
+#  ifdef lseek
+#   undef lseek
+#  endif
 #  define lseek(f,p,w) _lseeki64((f), (p), (w))
 #  define stat _stati64
 #  define fstat(f,s) _fstati64((f), (s))



More information about the ffmpeg-cvslog mailing list