0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-12 14:13:36 +00:00

17 lines
348 B
Diff

Fallback to `@TERMUX_PREFIX@/tmp` if env `XDG_RUNTIME_DIR` is not set.
--- a/src/util/anon_file.c
+++ b/src/util/anon_file.c
@@ -136,6 +136,11 @@
char *name;
path = getenv("XDG_RUNTIME_DIR");
+#ifdef __TERMUX__
+ if (!path) {
+ path = "@TERMUX_PREFIX@/tmp";
+ }
+#endif
if (!path) {
errno = ENOENT;
return -1;