termux-packages/packages/lnav/src-line_buffer.cc.patch

15 lines
527 B
Diff
Raw Normal View History

2021-12-21 00:17:57 +01:00
--- a/src/line_buffer.cc
+++ b/src/line_buffer.cc
@@ -104,9 +104,9 @@
lock_hack()
{
- char lockname[64];
+ char lockname[] = "@TERMUX_PREFIX@/tmp/lnav.XXXXXXXXXXXXXXXXXXXX.lck";
- snprintf(lockname, sizeof(lockname), "/tmp/lnav.%d.lck", getpid());
+ snprintf(lockname, sizeof(lockname), "@TERMUX_PREFIX@/tmp/lnav.%d.lck", getpid());
this->lh_fd = open(lockname, O_CREAT | O_RDWR, 0600);
log_perror(fcntl(this->lh_fd, F_SETFD, FD_CLOEXEC));
unlink(lockname);