#endif
}
-#if !HAVE_INET_ATON
-/* in os_support.c */
-int inet_aton (const char * str, struct in_addr * add);
-#endif
+int ff_inet_aton (const char * str, struct in_addr * add);
#if !HAVE_STRUCT_SOCKADDR_STORAGE
struct sockaddr_storage {
#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;
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
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;
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;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* needed by inet_aton() */
-#define _SVID_SOURCE
-
#include "libavutil/base64.h"
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
if (strcmp(buf1, "IP4") != 0)
return;
get_word_sep(buf1, sizeof(buf1), "/", &p);
- if (inet_aton(buf1, &sdp_ip) == 0)
+ if (ff_inet_aton(buf1, &sdp_ip) == 0)
return;
ttl = 16;
if (*p == '/') {
if (*p == '=') {
p++;
get_word_sep(buf, sizeof(buf), ";,", &p);
- if (inet_aton(buf, &ipaddr))
+ if (ff_inet_aton(buf, &ipaddr))
th->destination = ntohl(ipaddr.s_addr);
}
}