X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fos_support.c;h=15cea7fa5b0d75cf847751a604dde42fe84bd4bd;hb=337f777f378cfcc0d6f0d01fb7125905e8b0da55;hp=47445854c61b009b5787cb7e9cca7c8b7e5a2b8d;hpb=34cfb73b9928daf3104fe85a961ca3a1389ec076;p=ffmpeg diff --git a/libavformat/os_support.c b/libavformat/os_support.c index 47445854c61..15cea7fa5b0 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -43,10 +43,11 @@ #include "network.h" +#if !HAVE_GETADDRINFO #if !HAVE_INET_ATON #include -int ff_inet_aton(const char *str, struct in_addr *add) +static int inet_aton(const char *str, struct in_addr *add) { unsigned int add1 = 0, add2 = 0, add3 = 0, add4 = 0; @@ -60,14 +61,8 @@ int ff_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 int ff_getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res) { @@ -82,7 +77,7 @@ int ff_getaddrinfo(const char *node, const char *service, sin->sin_family = AF_INET; if (node) { - if (!ff_inet_aton(node, &sin->sin_addr)) { + if (!inet_aton(node, &sin->sin_addr)) { if (hints && (hints->ai_flags & AI_NUMERICHOST)) { av_free(sin); return EAI_FAIL;