From 1c18dc48c75517dffdf09abd292879d85f4e974e Mon Sep 17 00:00:00 2001 From: Sepalani Date: Sun, 4 Jun 2017 01:47:12 +0100 Subject: [PATCH] IOS/Network: Handle SO_EAFNOSUPPORT --- Source/Core/Core/IOS/Network/Socket.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Core/Core/IOS/Network/Socket.cpp b/Source/Core/Core/IOS/Network/Socket.cpp index 08033f5801..4cd7624647 100644 --- a/Source/Core/Core/IOS/Network/Socket.cpp +++ b/Source/Core/Core/IOS/Network/Socket.cpp @@ -620,6 +620,8 @@ s32 WiiSockMan::AddSocket(s32 fd) s32 WiiSockMan::NewSocket(s32 af, s32 type, s32 protocol) { + if (af != 2 && af != 23) // AF_INET && AF_INET6 + return -SO_EAFNOSUPPORT; s32 fd = static_cast(socket(af, type, protocol)); s32 wii_fd = AddSocket(fd); s32 ret = GetNetErrorCode(wii_fd, "NewSocket", false);