mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
gioerror: Map ENETDOWN to G_IO_ERROR_NETWORK_UNREACHABLE
This commit is contained in:
parent
3d6f843097
commit
587f5f25d0
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user