diff options
author | Martin Storsjö | 2010-01-11 17:45:17 +0000 |
---|---|---|
committer | Ronald S. Bultje | 2010-01-11 17:45:17 +0000 |
commit | 5d629b72cba60e1af4339b5646a9c1d511d892fb (patch) | |
tree | 81ee2d790b9df84f9be9750f69362084fa4dffa8 /libavformat/network.h | |
parent | 34a65f1fdd24c192dedc6638e909ceb7c58a2d18 (diff) |
Provide a fallback for getnameinfo() also. Patch by Martin Storsjö
<$firstname()$firstname,st>.
Originally committed as revision 21150 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/network.h')
-rw-r--r-- | libavformat/network.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libavformat/network.h b/libavformat/network.h index 496cae8e4a..ea8e946701 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -92,6 +92,14 @@ struct addrinfo { #define EAI_FAIL 4 #endif +#ifndef EAI_FAMILY +#define EAI_FAMILY 5 +#endif + +#ifndef EAI_NONAME +#define EAI_NONAME 8 +#endif + #ifndef AI_PASSIVE #define AI_PASSIVE 1 #endif @@ -104,12 +112,36 @@ struct addrinfo { #define AI_NUMERICHOST 4 #endif +#ifndef NI_NOFQDN +#define NI_NOFQDN 1 +#endif + +#ifndef NI_NUMERICHOST +#define NI_NUMERICHOST 2 +#endif + +#ifndef NI_NAMERQD +#define NI_NAMERQD 4 +#endif + +#ifndef NI_NUMERICSERV +#define NI_NUMERICSERV 8 +#endif + +#ifndef NI_DGRAM +#define NI_DGRAM 16 +#endif + #if !HAVE_GETADDRINFO int ff_getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res); void ff_freeaddrinfo(struct addrinfo *res); +int ff_getnameinfo(const struct sockaddr *sa, int salen, + char *host, int hostlen, + char *serv, int servlen, int flags); #define getaddrinfo ff_getaddrinfo #define freeaddrinfo ff_freeaddrinfo +#define getnameinfo ff_getnameinfo #endif #endif /* AVFORMAT_NETWORK_H */ |