termux-packages/packages/liblua52/lua-5.2.4_src_loslib.c.patch

16 lines
537 B
Diff
Raw Normal View History

diff -uNr lua-5.2.4/src/loslib.c lua-5.2.4.mod/src/loslib.c
--- lua-5.2.4/src/loslib.c 2013-04-12 21:48:47.000000000 +0300
+++ lua-5.2.4.mod/src/loslib.c 2018-06-26 16:13:07.191167382 +0300
@@ -44,9 +44,9 @@
*/
#if defined(LUA_USE_MKSTEMP)
#include <unistd.h>
-#define LUA_TMPNAMBUFSIZE 32
+#define LUA_TMPNAMBUFSIZE 256
#define lua_tmpnam(b,e) { \
- strcpy(b, "/tmp/lua_XXXXXX"); \
+ strcpy(b, "@TERMUX_PREFIX@/tmp/lua_XXXXXX"); \
e = mkstemp(b); \
if (e != -1) close(e); \
e = (e == -1); }