diff options
| author | Bin Meng <bin.meng@windriver.com> | 2022-08-24 17:39:40 +0800 |
|---|---|---|
| committer | Thomas Huth <thuth@redhat.com> | 2022-08-25 15:16:13 +0200 |
| commit | 3c239aa77ed19521992a0b14594907adc0d79a6c (patch) | |
| tree | e798c032e6bb092cbd61d3e9b810dab725a45b94 /tests/qtest/ivshmem-test.c | |
| parent | a47ea61de593a8243a66caba9d436040ecae25d5 (diff) | |
| download | focaccia-qemu-3c239aa77ed19521992a0b14594907adc0d79a6c.tar.gz focaccia-qemu-3c239aa77ed19521992a0b14594907adc0d79a6c.zip | |
tests/qtest: Use g_mkdtemp()
Windows does not provide a mkdtemp() API, but glib does. Replace mkdtemp() 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-3-bmeng.cn@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest/ivshmem-test.c')
| -rw-r--r-- | tests/qtest/ivshmem-test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c index e23a97fa8e..9611d05eb5 100644 --- a/tests/qtest/ivshmem-test.c +++ b/tests/qtest/ivshmem-test.c @@ -481,8 +481,8 @@ int main(int argc, char **argv) tmpshmem = mmap(0, TMPSHMSIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); g_assert(tmpshmem != MAP_FAILED); /* server */ - if (mkdtemp(dir) == NULL) { - g_error("mkdtemp: %s", g_strerror(errno)); + if (g_mkdtemp(dir) == NULL) { + g_error("g_mkdtemp: %s", g_strerror(errno)); } tmpdir = dir; tmpserver = g_strconcat(tmpdir, "/server", NULL); |