Mercurial > libavformat.hg
diff network.h @ 5954:1c93ef22cea6 libavformat
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.
author | rbultje |
---|---|
date | Thu, 15 Apr 2010 18:27:27 +0000 |
parents | a292ef47e2f9 |
children | e29a553aa1fc |
line wrap: on
line diff
--- a/network.h Thu Apr 15 13:30:12 2010 +0000 +++ b/network.h Thu Apr 15 18:27:27 2010 +0000 @@ -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