termux-packages/packages/librocksdb/env-fs_posix.cc.patch
2022-01-31 08:52:42 +09:00

14 lines
451 B
Diff

--- a/env/fs_posix.cc
+++ b/env/fs_posix.cc
@@ -905,8 +905,8 @@
if (env && env[0] != '\0') {
*result = env;
} else {
- char buf[100];
- snprintf(buf, sizeof(buf), "/tmp/rocksdbtest-%d", int(geteuid()));
+ char buf[] = "@TERMUX_PREFIX@/tmp/rocksdbtest-XXXXXXXXXXX";
+ snprintf(buf, sizeof(buf), "@TERMUX_PREFIX@/tmp/rocksdbtest-%d", int(geteuid()));
*result = buf;
}
// Directory may already exist