aboutsummaryrefslogtreecommitdiffstats
path: root/android/utils
diff options
context:
space:
mode:
Diffstat (limited to 'android/utils')
-rw-r--r--android/utils/bufprint.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/android/utils/bufprint.c b/android/utils/bufprint.c
index 45d411f..e3aa63c 100644
--- a/android/utils/bufprint.c
+++ b/android/utils/bufprint.c
@@ -215,7 +215,10 @@ bufprint_temp_dir(char* buff, char* end)
return bufprint(buff, end, "%s", path);
#else
- const char* tmppath = "/tmp/android";
+ const char* tmppath = getenv("ANDROID_TMP");
+ if (!tmppath) {
+ tmppath = "/tmp/android";
+ }
mkdir(tmppath, 0744);
return bufprint(buff, end, "%s", tmppath );
#endif