diff -uNr qemu-2.12.0/block.c qemu-2.12.0.mod/block.c --- qemu-2.12.0/block.c 2018-04-24 19:30:46.000000000 +0300 +++ qemu-2.12.0.mod/block.c 2018-06-25 14:11:33.210632119 +0300 @@ -544,7 +544,7 @@ const char *tmpdir; tmpdir = getenv("TMPDIR"); if (!tmpdir) { - tmpdir = "/var/tmp"; + tmpdir = "@TERMUX_PREFIX@/var/tmp"; } if (snprintf(filename, size, "%s/vl.XXXXXX", tmpdir) >= size) { return -EOVERFLOW;