From 490ba236f1b9bb055bb109d8ec7e5c7fdd6493dd Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 1 Dec 2021 00:04:40 +0200 Subject: [PATCH 7/8] set_socket_errno(): Handle WSAADDRNOTAVAIL See osdn #42046 Signed-off-by: Marko Lindqvist --- utility/netintf.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/utility/netintf.c b/utility/netintf.c index f66e3dc27b..23e45f3b93 100644 --- a/utility/netintf.c +++ b/utility/netintf.c @@ -79,21 +79,22 @@ 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: - log_error("Missing errno mapping for Winsock error #%d.", err); - /* TRANS: No full stop after the URL, could cause confusion. */ - log_error(_("Please report this message at %s"), BUG_URL); + case WSAEINTR: + case WSAEWOULDBLOCK: + case WSAECONNRESET: + case WSAECONNREFUSED: + case WSAEADDRNOTAVAIL: + case WSAETIMEDOUT: + case WSAECONNABORTED: + case WSAENOTSOCK: + errno = err; + return; + default: + log_error("Missing errno mapping for Winsock error #%d.", err); + /* TRANS: No full stop after the URL, could cause confusion. */ + log_error(_("Please report this message at %s"), BUG_URL); - errno = 0; + errno = 0; } } #endif /* FREECIV_HAVE_WINSOCK */ -- 2.33.0