Files
termux-packages/packages/mesa/fix-for-anon-file.patch
2023-03-02 07:32:08 +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;