0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-04 18:45:52 +00:00
termux-packages/packages/mesa/0003-fix-for-anon-file.patch
2023-10-24 13:53:46 +08: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;