aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.c
diff options
context:
space:
mode:
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r--tcg/tcg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index b6c46b7e25..b43b6a7981 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -4658,7 +4658,8 @@ static void tcg_register_jit_int(const void *buf_ptr, size_t buf_size,
/* Enable this block to be able to debug the ELF image file creation.
One can use readelf, objdump, or other inspection utilities. */
{
- FILE *f = fopen("/tmp/qemu.jit", "w+b");
+ g_autofree char *jit = g_strdup_printf("%s/qemu.jit", g_get_tmp_dir());
+ FILE *f = fopen(jit, "w+b");
if (f) {
if (fwrite(img, img_size, 1, f) != img_size) {
/* Avoid stupid unused return value warning for fwrite. */