diff --git a/gio/gioerror.c b/gio/gioerror.c index a23664986..0e39992bb 100644 --- a/gio/gioerror.c +++ b/gio/gioerror.c @@ -291,6 +291,12 @@ g_io_error_from_errno (gint err_no) break; #endif +#ifdef ENETDOWN + case ENETDOWN: + return G_IO_ERROR_NETWORK_UNREACHABLE; + break; +#endif + #ifdef ECONNREFUSED case ECONNREFUSED: return G_IO_ERROR_CONNECTION_REFUSED; diff --git a/gio/tests/error.c b/gio/tests/error.c index 2f5189b99..298fa88b0 100644 --- a/gio/tests/error.c +++ b/gio/tests/error.c @@ -577,7 +577,7 @@ test_error_from_errno (void) #ifdef ENETDOWN g_assert_cmpuint (g_io_error_from_errno (ENETDOWN), ==, - G_IO_ERROR_FAILED); + G_IO_ERROR_NETWORK_UNREACHABLE); #endif #ifdef ECONNABORTED