diff options
author | David Conrad <lessen42@gmail.com> | 2010-03-07 19:48:59 +0000 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2010-03-07 19:48:59 +0000 |
commit | ac11d562e51a7764abc20447303ce95225d07a0b (patch) | |
tree | a56482abec9b273fdb94c0f171faec90777eacb4 /libavformat/os_support.c | |
parent | d1be963568824306ac8f826a89df98761f89c0e2 (diff) | |
download | ffmpeg-ac11d562e51a7764abc20447303ce95225d07a0b.tar.gz |
Localize the #define _SVID_SOURCE needed for inet_aton() to os_support.c
Originally committed as revision 22284 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/os_support.c')
-rw-r--r-- | libavformat/os_support.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libavformat/os_support.c b/libavformat/os_support.c index 4bf2e268cf..d9b6c1ed69 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -45,7 +45,7 @@ #include <stdlib.h> #include <strings.h> -int inet_aton (const char * str, struct in_addr * add) +int ff_inet_aton (const char * str, struct in_addr * add) { unsigned int add1 = 0, add2 = 0, add3 = 0, add4 = 0; @@ -58,6 +58,11 @@ int inet_aton (const char * str, struct in_addr * add) return 1; } +#else +int ff_inet_aton (const char * str, struct in_addr * add) +{ + return inet_aton(str, add); +} #endif /* !HAVE_INET_ATON */ #if !HAVE_GETADDRINFO @@ -85,7 +90,7 @@ int ff_getaddrinfo(const char *node, const char *service, sin->sin_family = AF_INET; if (node) { - if (!inet_aton(node, &sin->sin_addr)) { + if (!ff_inet_aton(node, &sin->sin_addr)) { if (hints && (hints->ai_flags & AI_NUMERICHOST)) { av_free(sin); return EAI_FAIL; @@ -221,7 +226,7 @@ const char *ff_gai_strerror(int ecode) int resolve_host(struct in_addr *sin_addr, const char *hostname) { - if (!inet_aton(hostname, sin_addr)) { + if (!ff_inet_aton(hostname, sin_addr)) { #if HAVE_GETADDRINFO struct addrinfo *ai, *cur; struct addrinfo hints; |