diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2010-04-15 18:27:27 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2010-04-15 18:27:27 +0000 |
commit | 4aecee7fc34d5eb3dccf2b8ff070cd1029a14d96 (patch) | |
tree | 5a0fac93f5de93e591335f9c4892eeafb5933fa9 /libavformat/network.h | |
parent | e58c05bb3c8b7bd3b93d264facbf290aeae4c483 (diff) | |
download | ffmpeg-4aecee7fc34d5eb3dccf2b8ff070cd1029a14d96.tar.gz |
Fix compile error on mingw where ETIMEDOUT is missing (because it's a WSA error).
This patch also changes FF_NETERROR() to be an AVERROR(), i.e. it is always
negative, whereas it was previously positive.
Originally committed as revision 22887 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/network.h')
-rw-r--r-- | libavformat/network.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/network.h b/libavformat/network.h index 53bb9c07c7..0fbcbbb227 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -27,8 +27,8 @@ #include <winsock2.h> #include <ws2tcpip.h> -#define ff_neterrno() WSAGetLastError() -#define FF_NETERROR(err) WSA##err +#define ff_neterrno() (-WSAGetLastError()) +#define FF_NETERROR(err) (-WSA##err) #define WSAEAGAIN WSAEWOULDBLOCK #else #include <sys/types.h> @@ -36,8 +36,8 @@ #include <netinet/in.h> #include <netdb.h> -#define ff_neterrno() errno -#define FF_NETERROR(err) err +#define ff_neterrno() AVERROR(errno) +#define FF_NETERROR(err) AVERROR(err) #endif #if HAVE_ARPA_INET_H |