termux-packages/packages/coreutils/mktemp.patch

22 lines
805 B
Diff
Raw Normal View History

2015-06-13 01:03:31 +02:00
diff -u -r ../coreutils-8.22/src/mktemp.c ./src/mktemp.c
--- ../coreutils-8.22/src/mktemp.c 2013-12-04 15:48:30.000000000 +0100
+++ ./src/mktemp.c 2014-06-03 11:31:58.351787119 +0200
@@ -269,7 +269,7 @@
else if (dest_dir_arg && *dest_dir_arg)
dest_dir = dest_dir_arg;
else
- dest_dir = "/tmp";
+ dest_dir = "@TERMUX_PREFIX@/tmp";
if (last_component (template) != template)
error (EXIT_FAILURE, 0,
@@ -283,7 +283,7 @@
else
{
char *env = getenv ("TMPDIR");
- dest_dir = (env && *env ? env : "/tmp");
+ dest_dir = (env && *env ? env : "@TERMUX_PREFIX@/tmp");
}
if (IS_ABSOLUTE_FILE_NAME (template))
error (EXIT_FAILURE, 0,