Merge pull request #7169 from GregorR/wii-u-netplay-fix

Fix netplay on Wii U
This commit is contained in:
Twinaphex 2018-10-10 20:14:24 +02:00 committed by GitHub
commit f00f2e3ccf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -183,6 +183,16 @@ int getaddrinfo_retro(const char *node, const char *service,
#endif
}
#if defined(WIIU)
if (node == NULL) {
/* Wii U's socket library chokes on NULL node */
if (hints->ai_flags & AI_PASSIVE)
node = "0.0.0.0";
else
node = "127.0.0.1";
}
#endif
#ifdef HAVE_SOCKET_LEGACY
info = (struct addrinfo*)calloc(1, sizeof(*info));
if (!info)