summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorSepalani <sepalani@hotmail.fr>2017-06-04 01:47:12 +0100
committerSepalani <sepalani@hotmail.fr>2017-06-04 05:44:48 +0100
commit1c18dc48c75517dffdf09abd292879d85f4e974e (patch)
tree198aed33d16ecdef569d62352ebd5725adc1a15f /Source/Core
parent5a9e61997cb45f7f3f66a8f9f6e39f4a1b7abc06 (diff)
IOS/Network: Handle SO_EAFNOSUPPORT
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/IOS/Network/Socket.cpp2
1 files changed, 2 insertions, 0 deletions
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<s32>(socket(af, type, protocol));
s32 wii_fd = AddSocket(fd);
s32 ret = GetNetErrorCode(wii_fd, "NewSocket", false);