--- a/common/util.c
+++ b/common/util.c
@@ -86,7 +86,7 @@
     }
     datahome = getenv ("TMPDIR");
     if (!datahome)
-	datahome = "/tmp";
+	datahome = "@TERMUX_PREFIX@/tmp";
     snprintf (buf, bufsz, "%s", datahome);
     return buf;
 }
