aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/libqtest.c
diff options
context:
space:
mode:
authorBin Meng <bin.meng@windriver.com>2022-08-24 17:39:39 +0800
committerThomas Huth <thuth@redhat.com>2022-08-25 15:16:13 +0200
commita47ea61de593a8243a66caba9d436040ecae25d5 (patch)
tree8a7983c569871c1a78b89e49797c7ed217396791 /tests/qtest/libqtest.c
parent9a99f964b152f8095949bbddca7841744ad418da (diff)
tests/qtest: Use g_setenv()
Windows does not provide a setenv() API, but glib does. Replace setenv() call with the glib version. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220824094029.1634519-2-bmeng.cn@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest/libqtest.c')
-rw-r--r--tests/qtest/libqtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index 8c159eacf5..ad6860d774 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -1424,7 +1424,7 @@ QTestState *qtest_inproc_init(QTestState **s, bool log, const char* arch,
* way, qtest_get_arch works for inproc qtest.
*/
gchar *bin_path = g_strconcat("/qemu-system-", arch, NULL);
- setenv("QTEST_QEMU_BINARY", bin_path, 0);
+ g_setenv("QTEST_QEMU_BINARY", bin_path, 0);
g_free(bin_path);
return qts;