patch: fix path to /tmp
This commit is contained in:
parent
2d0fe0b02b
commit
3f9bca7905
@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://savannah.gnu.org/projects/patch/
|
||||
TERMUX_PKG_DESCRIPTION="GNU patch which applies diff files to create patched files"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_VERSION=2.7.6
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/patch/patch-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_path_ED=$TERMUX_PREFIX/bin/ed"
|
||||
|
35
packages/patch/tmpdir-path.patch
Normal file
35
packages/patch/tmpdir-path.patch
Normal file
@ -0,0 +1,35 @@
|
||||
diff -uNr patch-2.7.6/lib/tempname.c patch-2.7.6.mod/lib/tempname.c
|
||||
--- patch-2.7.6/lib/tempname.c 2018-02-03 14:41:53.000000000 +0200
|
||||
+++ patch-2.7.6.mod/lib/tempname.c 2019-03-01 18:34:47.353225515 +0200
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef P_tmpdir
|
||||
-# define P_tmpdir "/tmp"
|
||||
+# define P_tmpdir "@TERMUX_PREFIX@/tmp"
|
||||
#endif
|
||||
#ifndef TMP_MAX
|
||||
# define TMP_MAX 238328
|
||||
@@ -147,8 +147,8 @@
|
||||
{
|
||||
if (direxists (P_tmpdir))
|
||||
dir = P_tmpdir;
|
||||
- else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
|
||||
- dir = "/tmp";
|
||||
+ else if (strcmp (P_tmpdir, "@TERMUX_PREFIX@/tmp") != 0 && direxists ("@TERMUX_PREFIX@/tmp"))
|
||||
+ dir = "@TERMUX_PREFIX@/tmp";
|
||||
else
|
||||
{
|
||||
__set_errno (ENOENT);
|
||||
diff -uNr patch-2.7.6/src/util.c patch-2.7.6.mod/src/util.c
|
||||
--- patch-2.7.6/src/util.c 2018-02-03 14:41:49.000000000 +0200
|
||||
+++ patch-2.7.6.mod/src/util.c 2019-03-01 18:35:00.313283739 +0200
|
||||
@@ -1601,7 +1601,7 @@
|
||||
}
|
||||
|
||||
#ifndef TMPDIR
|
||||
-#define TMPDIR "/tmp"
|
||||
+#define TMPDIR "@TERMUX_PREFIX@/tmp"
|
||||
#endif
|
||||
|
||||
struct try_safe_open_args
|
Loading…
Reference in New Issue
Block a user