libluajit: fix tmpdir path
%ci:no-build - package is built & uploaded manually
This commit is contained in:
parent
1534926ed9
commit
16cc46caee
@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://luajit.org/
|
||||
TERMUX_PKG_DESCRIPTION="Just-In-Time Compiler for Lua"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_VERSION=2.1.0~beta3
|
||||
TERMUX_PKG_REVISION=5
|
||||
TERMUX_PKG_REVISION=6
|
||||
TERMUX_PKG_SRCURL=https://github.com/LuaJIT/LuaJIT/archive/v2.1.0-beta3.tar.gz
|
||||
TERMUX_PKG_SHA256=409f7fe570d3c16558e594421c47bdd130238323c9d6fd6c83dedd2aaeb082a8
|
||||
TERMUX_PKG_BREAKS="libluajit-dev"
|
||||
|
29
packages/libluajit/tmpdir-fix.patch
Normal file
29
packages/libluajit/tmpdir-fix.patch
Normal file
@ -0,0 +1,29 @@
|
||||
diff -uNr LuaJIT-2.1.0-beta3/src/lib_os.c LuaJIT-2.1.0-beta3.mod/src/lib_os.c
|
||||
--- LuaJIT-2.1.0-beta3/src/lib_os.c 2017-05-01 22:03:01.000000000 +0300
|
||||
+++ LuaJIT-2.1.0-beta3.mod/src/lib_os.c 2020-06-07 16:58:03.086422851 +0300
|
||||
@@ -81,9 +81,9 @@
|
||||
return 0;
|
||||
#else
|
||||
#if LJ_TARGET_POSIX
|
||||
- char buf[15+1];
|
||||
+ char buf[sizeof("@TERMUX_PREFIX@")+16];
|
||||
int fp;
|
||||
- strcpy(buf, "/tmp/lua_XXXXXX");
|
||||
+ strcpy(buf, "@TERMUX_PREFIX@/tmp/lua_XXXXXX");
|
||||
fp = mkstemp(buf);
|
||||
if (fp != -1)
|
||||
close(fp);
|
||||
diff -uNr LuaJIT-2.1.0-beta3/src/lj_trace.c LuaJIT-2.1.0-beta3.mod/src/lj_trace.c
|
||||
--- LuaJIT-2.1.0-beta3/src/lj_trace.c 2017-05-01 22:03:01.000000000 +0300
|
||||
+++ LuaJIT-2.1.0-beta3.mod/src/lj_trace.c 2020-06-07 16:58:42.242740925 +0300
|
||||
@@ -107,8 +107,8 @@
|
||||
lua_assert(startpc >= proto_bc(pt) && startpc < proto_bc(pt) + pt->sizebc);
|
||||
lineno = lj_debug_line(pt, proto_bcpos(pt, startpc));
|
||||
if (!fp) {
|
||||
- char fname[40];
|
||||
- sprintf(fname, "/tmp/perf-%d.map", getpid());
|
||||
+ char fname[sizeof("@TERMUX_PREFIX@")+40];
|
||||
+ sprintf(fname, "@TERMUX_PREFIX@/tmp/perf-%d.map", getpid());
|
||||
if (!(fp = fopen(fname, "w"))) return;
|
||||
setlinebuf(fp);
|
||||
}
|
Loading…
Reference in New Issue
Block a user