diff -uNr qemu-3.0.0/block.c qemu-3.0.0.mod/block.c --- qemu-3.0.0/block.c 2018-08-14 22:10:34.000000000 +0300 +++ qemu-3.0.0.mod/block.c 2018-10-26 16:49:45.246931666 +0300 @@ -549,7 +549,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;