Revision 04a2b04b

View differences:

libavformat/network.h
147 147
int ff_getnameinfo(const struct sockaddr *sa, int salen,
148 148
                   char *host, int hostlen,
149 149
                   char *serv, int servlen, int flags);
150
const char *ff_gai_strerror(int ecode);
150 151
#define getaddrinfo ff_getaddrinfo
151 152
#define freeaddrinfo ff_freeaddrinfo
152 153
#define getnameinfo ff_getnameinfo
154
#define gai_strerror ff_gai_strerror
153 155
#endif
154 156

  
155 157
#endif /* AVFORMAT_NETWORK_H */
libavformat/os_support.c
203 203

  
204 204
    return 0;
205 205
}
206

  
207
const char *ff_gai_strerror(int ecode)
208
{
209
    switch(ecode) {
210
    case EAI_FAIL   : return "A non-recoverable error occurred";
211
    case EAI_FAMILY : return "The address family was not recognized or the address length was invalid for the specified family";
212
    case EAI_NONAME : return "The name does not resolve for the supplied parameters";
213
    }
214

  
215
    return "Unknown error";
216
}
206 217
#endif
207 218

  
208 219
/* resolve host with also IP address parsing */

Also available in: Unified diff