summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-07-27 15:24:37 +0100
committerSimon McVittie <smcv@collabora.com>2022-08-19 10:56:30 +0100
commit9a0e6fd00473ad2c529ec86249b48d88e893d165 (patch)
tree195b6c62c9609611eaa83e4b6eececa284a2b428
parent29681b4b77f2706b10b7f8c1ab47f695dce21e21 (diff)
downloadlibglnx-9a0e6fd00473ad2c529ec86249b48d88e893d165.tar.gz
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>
-rw-r--r--tests/libglnx-testlib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/libglnx-testlib.c b/tests/libglnx-testlib.c
index 37b3ece..3eb2ba1 100644
--- a/tests/libglnx-testlib.c
+++ b/tests/libglnx-testlib.c
@@ -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);