mirror of
https://github.com/termux/termux-packages.git
synced 2024-12-04 18:45:52 +00:00
17 lines
348 B
Diff
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;
|