coreutils: add lib/tmpdir.c to fix-paths.patch

This commit is contained in:
termux-pacman-bot
2023-03-23 07:32:05 +00:00
parent 539d44cdab
commit f68ff1c664
2 changed files with 24 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Basic file, shell and text manipulation utilities from t
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=9.2
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/coreutils/coreutils-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=6885ff47b9cdb211de47d368c17853f406daaf98b148aaecdf10de29cc04b0b3
TERMUX_PKG_DEPENDS="libandroid-support, libgmp, libiconv"

View File

@@ -10,6 +10,29 @@ diff -uNr coreutils-8.32/lib/getusershell.c coreutils-8.32.mod/lib/getusershell.
};
/* Index of the next shell in 'default_shells' to return.
diff -uNr coreutils-9.2/lib/tmpdir.c coreutils-9.2.mod/lib/tmpdir.c
--- coreutils-9.2/lib/tmpdir.c 2023-03-13 18:12:12.000000000 +0000
+++ coreutils-9.2.mod/lib/tmpdir.c 2023-03-23 06:56:30.519517214 +0000
@@ -35,7 +35,7 @@
# ifdef _P_tmpdir /* native Windows */
# define P_tmpdir _P_tmpdir
# else
-# define P_tmpdir "/tmp"
+# define P_tmpdir "@TERMUX_PREFIX@/tmp"
# endif
#endif
@@ -135,8 +135,8 @@
#endif
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 coreutils-8.32/src/mktemp.c coreutils-8.32.mod/src/mktemp.c
--- coreutils-8.32/src/mktemp.c 2020-01-01 16:13:12.000000000 +0200
+++ coreutils-8.32.mod/src/mktemp.c 2020-05-05 14:13:10.984279966 +0300