From b88c297f8e6d0f9c933f6d3b46dd65fed6dc1bcc Mon Sep 17 00:00:00 2001 From: MrHuu Date: Tue, 6 Sep 2022 01:51:15 +0200 Subject: [PATCH] (Network) Don't call getsockopt on 3DS platform (#14389) --- libretro-common/net/net_socket.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libretro-common/net/net_socket.c b/libretro-common/net/net_socket.c index cd4c4b6cf8..58497013f6 100644 --- a/libretro-common/net/net_socket.c +++ b/libretro-common/net/net_socket.c @@ -728,7 +728,10 @@ bool socket_connect_with_timeout(int fd, void *data, int timeout) return false; } -#if !defined(GEKKO) && defined(SO_ERROR) + /* Excluded platforms do not have getsockopt implemented [GEKKO], + * or it's returned values are unreliable [3DS]. + */ +#if !defined(GEKKO) && !defined(_3DS) && defined(SO_ERROR) { int error = -1; socklen_t errsz = sizeof(error);