From d6fd9f0cc1ced58bcb75258bbf898c1ed09bd577 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 10 Dec 2017 01:19:58 +0100 Subject: [PATCH] Add fallback AF_INET6 path --- libretro-common/net/net_compat.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libretro-common/net/net_compat.c b/libretro-common/net/net_compat.c index 13fdbfff87..8ef567eb88 100644 --- a/libretro-common/net/net_compat.c +++ b/libretro-common/net/net_compat.c @@ -211,7 +211,13 @@ int getaddrinfo_retro(const char *node, const char *service, goto error; in_addr->sin_family = host->h_addrtype; + +#ifdef AF_INET6 + /* TODO/FIXME - In case we ever want to support IPv6 */ + in_addr->sin_addr.s_addr = inet_addr(host->h_addr_list[0]); +#else memcpy(&in_addr->sin_addr, host->h_addr, host->h_length); +#endif } else goto error;