Mercurial > libavformat.hg
diff os_support.c @ 5766:a292ef47e2f9 libavformat
Localize the #define _SVID_SOURCE needed for inet_aton() to os_support.c
author | conrad |
---|---|
date | Sun, 07 Mar 2010 19:48:59 +0000 |
parents | de3bbecc27ad |
children | 9a9284a1cf7f |
line wrap: on
line diff
--- a/os_support.c Sun Mar 07 08:52:53 2010 +0000 +++ b/os_support.c Sun Mar 07 19:48:59 2010 +0000 @@ -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 @@ 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 @@ 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 @@ 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;