Mercurial > libavformat.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
5953:c3ebc8d7af38 | 5954:1c93ef22cea6 |
---|---|
25 | 25 |
26 #if HAVE_WINSOCK2_H | 26 #if HAVE_WINSOCK2_H |
27 #include <winsock2.h> | 27 #include <winsock2.h> |
28 #include <ws2tcpip.h> | 28 #include <ws2tcpip.h> |
29 | 29 |
30 #define ff_neterrno() WSAGetLastError() | 30 #define ff_neterrno() (-WSAGetLastError()) |
31 #define FF_NETERROR(err) WSA##err | 31 #define FF_NETERROR(err) (-WSA##err) |
32 #define WSAEAGAIN WSAEWOULDBLOCK | 32 #define WSAEAGAIN WSAEWOULDBLOCK |
33 #else | 33 #else |
34 #include <sys/types.h> | 34 #include <sys/types.h> |
35 #include <sys/socket.h> | 35 #include <sys/socket.h> |
36 #include <netinet/in.h> | 36 #include <netinet/in.h> |
37 #include <netdb.h> | 37 #include <netdb.h> |
38 | 38 |
39 #define ff_neterrno() errno | 39 #define ff_neterrno() AVERROR(errno) |
40 #define FF_NETERROR(err) err | 40 #define FF_NETERROR(err) AVERROR(err) |
41 #endif | 41 #endif |
42 | 42 |
43 #if HAVE_ARPA_INET_H | 43 #if HAVE_ARPA_INET_H |
44 #include <arpa/inet.h> | 44 #include <arpa/inet.h> |
45 #endif | 45 #endif |