diff --git a/gio/gioerror.c b/gio/gioerror.c index 52c57d95f..2df120fc6 100644 --- a/gio/gioerror.c +++ b/gio/gioerror.c @@ -121,6 +121,12 @@ g_io_error_from_errno (gint err_no) break; #endif +#ifdef EMLINK + case EMLINK: + return G_IO_ERROR_TOO_MANY_LINKS; + break; +#endif + #ifdef ELOOP case ELOOP: return G_IO_ERROR_TOO_MANY_LINKS; diff --git a/gio/tests/error.c b/gio/tests/error.c index 133c2d777..8c7fea8ee 100644 --- a/gio/tests/error.c +++ b/gio/tests/error.c @@ -85,6 +85,11 @@ test_error_from_errno (void) G_IO_ERROR_TOO_MANY_LINKS); #endif +#ifdef EMLINK + g_assert_cmpint (g_io_error_from_errno (EMLINK), ==, + G_IO_ERROR_TOO_MANY_LINKS); +#endif + #ifdef ENOSPC g_assert_cmpint (g_io_error_from_errno (ENOSPC), ==, G_IO_ERROR_NO_SPACE);