Revision ac11d562

View differences:

libavformat/network.h
63 63
#endif
64 64
}
65 65

  
66
#if !HAVE_INET_ATON
67
/* in os_support.c */
68
int inet_aton (const char * str, struct in_addr * add);
69
#endif
66
int ff_inet_aton (const char * str, struct in_addr * add);
70 67

  
71 68
#if !HAVE_STRUCT_SOCKADDR_STORAGE
72 69
struct sockaddr_storage {
libavformat/os_support.c
45 45
#include <stdlib.h>
46 46
#include <strings.h>
47 47

  
48
int inet_aton (const char * str, struct in_addr * add)
48
int ff_inet_aton (const char * str, struct in_addr * add)
49 49
{
50 50
    unsigned int add1 = 0, add2 = 0, add3 = 0, add4 = 0;
51 51

  
......
58 58

  
59 59
    return 1;
60 60
}
61
#else
62
int ff_inet_aton (const char * str, struct in_addr * add)
63
{
64
    return inet_aton(str, add);
65
}
61 66
#endif /* !HAVE_INET_ATON */
62 67

  
63 68
#if !HAVE_GETADDRINFO
......
85 90
    sin->sin_family = AF_INET;
86 91

  
87 92
    if (node) {
88
        if (!inet_aton(node, &sin->sin_addr)) {
93
        if (!ff_inet_aton(node, &sin->sin_addr)) {
89 94
            if (hints && (hints->ai_flags & AI_NUMERICHOST)) {
90 95
                av_free(sin);
91 96
                return EAI_FAIL;
......
221 226
int resolve_host(struct in_addr *sin_addr, const char *hostname)
222 227
{
223 228

  
224
    if (!inet_aton(hostname, sin_addr)) {
229
    if (!ff_inet_aton(hostname, sin_addr)) {
225 230
#if HAVE_GETADDRINFO
226 231
        struct addrinfo *ai, *cur;
227 232
        struct addrinfo hints;
libavformat/rtsp.c
19 19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 20
 */
21 21

  
22
/* needed by inet_aton() */
23
#define _SVID_SOURCE
24

  
25 22
#include "libavutil/base64.h"
26 23
#include "libavutil/avstring.h"
27 24
#include "libavutil/intreadwrite.h"
......
359 356
        if (strcmp(buf1, "IP4") != 0)
360 357
            return;
361 358
        get_word_sep(buf1, sizeof(buf1), "/", &p);
362
        if (inet_aton(buf1, &sdp_ip) == 0)
359
        if (ff_inet_aton(buf1, &sdp_ip) == 0)
363 360
            return;
364 361
        ttl = 16;
365 362
        if (*p == '/') {
......
803 800
                if (*p == '=') {
804 801
                    p++;
805 802
                    get_word_sep(buf, sizeof(buf), ";,", &p);
806
                    if (inet_aton(buf, &ipaddr))
803
                    if (ff_inet_aton(buf, &ipaddr))
807 804
                        th->destination = ntohl(ipaddr.s_addr);
808 805
                }
809 806
            }

Also available in: Unified diff