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

Reviewed-by: Ramiro Polla <ramiro.polla@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Vincent Torri 2012-01-29 10:45:22 +01:00 committed by Michael Niedermayer
parent 1f0fa80bfa
commit ed3c0fe85d
2 changed files with 15 additions and 0 deletions

View File

@ -31,9 +31,21 @@
#include <winsock2.h> #include <winsock2.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
#ifdef EPROTONOSUPPORT
# undef EPROTONOSUPPORT
#endif
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
#ifdef ETIMEDOUT
# undef ETIMEDOUT
#endif
#define ETIMEDOUT WSAETIMEDOUT #define ETIMEDOUT WSAETIMEDOUT
#ifdef ECONNREFUSED
# undef ECONNREFUSED
#endif
#define ECONNREFUSED WSAECONNREFUSED #define ECONNREFUSED WSAECONNREFUSED
#ifdef EINPROGRESS
# undef EINPROGRESS
#endif
#define EINPROGRESS WSAEINPROGRESS #define EINPROGRESS WSAEINPROGRESS
int ff_neterrno(void); int ff_neterrno(void);

View File

@ -31,6 +31,9 @@
#if defined(__MINGW32__) && !defined(__MINGW32CE__) #if defined(__MINGW32__) && !defined(__MINGW32CE__)
# include <fcntl.h> # include <fcntl.h>
# ifdef lseek
# undef lseek
# endif
# define lseek(f,p,w) _lseeki64((f), (p), (w)) # define lseek(f,p,w) _lseeki64((f), (p), (w))
# define stat _stati64 # define stat _stati64
# define fstat(f,s) _fstati64((f), (s)) # define fstat(f,s) _fstati64((f), (s))