diff --git a/gio/gioerror.c b/gio/gioerror.c index 1b64dfd0b..8456afe4a 100644 --- a/gio/gioerror.c +++ b/gio/gioerror.c @@ -208,6 +208,12 @@ g_io_error_from_errno (gint err_no) break; #endif +#ifdef EADDRNOTAVAIL + case EADDRNOTAVAIL: + return G_IO_ERROR_CONNECTION_REFUSED; + break; +#endif + #ifdef ECONNRESET case ECONNRESET: return G_IO_ERROR_CONNECTION_CLOSED; diff --git a/gio/tests/error.c b/gio/tests/error.c index 702c9c651..7265fd284 100644 --- a/gio/tests/error.c +++ b/gio/tests/error.c @@ -572,7 +572,7 @@ test_error_from_errno (void) #ifdef EADDRNOTAVAIL g_assert_cmpuint (g_io_error_from_errno (EADDRNOTAVAIL), ==, - G_IO_ERROR_FAILED); + G_IO_ERROR_CONNECTION_REFUSED); #endif #ifdef ENETDOWN