[w32error] Add ENXIO error case (#5199)
authorLudovic Henry <ludovic@xamarin.com>
Fri, 14 Jul 2017 14:58:25 +0000 (10:58 -0400)
committerGitHub <noreply@github.com>
Fri, 14 Jul 2017 14:58:25 +0000 (10:58 -0400)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=58100

mcs/class/System/ReferenceSources/Win32Exception.cs
mono/metadata/w32error.h
mono/metadata/w32socket-unix.c

index f80d759f63d222ebc29626a9db2e8a5ebbeb9b49..d5b1e3863d6a490fd850c1deae055f0429bdcbda 100644 (file)
@@ -1733,6 +1733,7 @@ namespace System.ComponentModel
                        case 13882: /* ERROR_IPSEC_IKE_MM_LIMIT */ return "IPSEC IKE mm limit";
                        case 13883: /* ERROR_IPSEC_IKE_NEGOTIATION_DISABLED */ return "IPSEC IKE negotiation disabled";
                        case 13884: /* ERROR_IPSEC_IKE_NEG_STATUS_END */ return "IPSEC IKE neg status end";
+                       case 100001: /* WSAENXIO */ return "Device not configured";
 #endif // MOBILE
                        default:
                                return string.Format ("mono-io-layer-error ({0})", error);
index 439bdd81a2a0d366e5f1a3fec63ac8448cbfed49..bd42451469ffb2bdc511c9262e2b6c0312f4cf81 100644 (file)
@@ -76,6 +76,7 @@
 #define WSAEHOSTDOWN               10064
 #define WSAEHOSTUNREACH            10065
 #define WSASYSCALLFAILURE          10107
+#define WSAENXIO                   100001
 
 #endif
 
index 87743377324bc01c406342ed181dd3d7229d36ff..5816b142b051e09e6c784e93518bbd9241dbd643 100644 (file)
@@ -1324,6 +1324,9 @@ mono_w32socket_convert_error (gint error)
        case ENODEV: return WSAENETDOWN;
 #ifdef EPROTOTYPE
        case EPROTOTYPE: return WSAEPROTOTYPE;
+#endif
+#ifdef ENXIO
+       case ENXIO: return WSAENXIO;
 #endif
        default:
                g_error ("%s: no translation into winsock error for (%d) \"%s\"", __func__, error, g_strerror (error));