From faf03b64a5976299a5e8830c0535d2faab7cebe5 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 1 Dec 2021 00:00:28 +0200 Subject: [PATCH 35/35] set_socket_errno(): Handle WSAADDRNOTAVAIL See osdn #42046 Signed-off-by: Marko Lindqvist --- utility/netintf.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/utility/netintf.c b/utility/netintf.c index 32e98caa7b..cd76ff47c4 100644 --- a/utility/netintf.c +++ b/utility/netintf.c @@ -80,19 +80,20 @@ static void set_socket_errno(void) switch (err) { /* these have mappings to symbolic errno names in net_types.h */ - case WSAEINTR: - case WSAEWOULDBLOCK: - case WSAECONNRESET: - case WSAECONNREFUSED: - case WSAETIMEDOUT: - case WSAECONNABORTED: - case WSAENOTSOCK: - errno = err; - return; - default: - bugreport_request("Missing errno mapping for Winsock error #%d.", err); + case WSAEINTR: + case WSAEWOULDBLOCK: + case WSAECONNRESET: + case WSAECONNREFUSED: + case WSAADDRNOTAVAIL: + case WSAETIMEDOUT: + case WSAECONNABORTED: + case WSAENOTSOCK: + errno = err; + return; + default: + bugreport_request("Missing errno mapping for Winsock error #%d.", err); - errno = 0; + errno = 0; } } #endif /* FREECIV_HAVE_WINSOCK */ -- 2.33.0