testlib: Be compatible with ancient GLib by using glnx_close_fd

This is an enabler for testing a backport of GTest helpers
(g_test_skip(), etc.) in the oldest environment that I have conveniently
available (Steam Runtime 1 'scout' with GLib 2.32).

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2022-07-27 15:24:37 +01:00
parent 29681b4b77
commit 9a0e6fd004

View File

@@ -67,8 +67,7 @@ _glnx_test_auto_temp_dir_leave (_GLnxTestAutoTempDir *dir)
glnx_tmpdir_delete (&dir->temp_dir, NULL, &error);
g_assert_no_error (error);
g_close (dir->old_cwd_fd, &error);
g_assert_no_error (error);
glnx_close_fd (&dir->old_cwd_fd);
g_free (dir->old_cwd);
g_free (dir);