Fix netplay on Wii U
getaddrinfo on Wii U doesn't support node==NULL. As I don't know of this bug on any other platform, I've made a Wii-U-specific workaround in getaddrinfo_retro.
This commit is contained in:
parent
4f4b1c182f
commit
7634b1bbb0
|
@ -183,6 +183,16 @@ int getaddrinfo_retro(const char *node, const char *service,
|
||||||
#endif
|
#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
|
#ifdef HAVE_SOCKET_LEGACY
|
||||||
info = (struct addrinfo*)calloc(1, sizeof(*info));
|
info = (struct addrinfo*)calloc(1, sizeof(*info));
|
||||||
if (!info)
|
if (!info)
|
||||||
|
|
Loading…
Reference in New Issue