[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 1/2] glib-compat: Define g_spawn_check_wait_status()
From: |
Akihiko Odaki |
Subject: |
[PATCH v3 1/2] glib-compat: Define g_spawn_check_wait_status() |
Date: |
Wed, 15 Jan 2025 15:25:46 +0900 |
g_spawn_check_exit_status() is renamed to g_spawn_check_wait_status()
in 2.70.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Lei Yang <leiyang@redhat.com>
---
include/glib-compat.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/glib-compat.h b/include/glib-compat.h
index 86be439ba0ef..a553ba13a36e 100644
--- a/include/glib-compat.h
+++ b/include/glib-compat.h
@@ -68,6 +68,17 @@
* without generating warnings.
*/
+static inline gboolean g_spawn_check_wait_status_qemu(gint wait_status,
+ GError **error)
+{
+#if GLIB_CHECK_VERSION(2, 70, 0)
+ return g_spawn_check_wait_status(wait_status, error);
+#else
+ return g_spawn_check_exit_status(wait_status, error);
+#endif
+}
+#define g_spawn_check_wait_status(w, e) g_spawn_check_wait_status_qemu(w, e)
+
/*
* g_memdup2_qemu:
* @mem: (nullable): the memory to copy.
--
2.47.1