termux-packages/packages/gnucobol/libcob-common.c.patch

16 lines
473 B
Diff
Raw Normal View History

2021-12-31 21:44:07 +01:00
--- a/libcob/common.c
+++ b/libcob/common.c
@@ -4631,9 +4631,9 @@
#else
if ((tmpdir = check_valid_env_tmpdir ("TMP")) == NULL
&& (tmpdir = check_valid_env_tmpdir ("TEMP")) == NULL) {
- if (!check_valid_dir ("/tmp")) {
- tmp = cob_fast_malloc (5U);
- strcpy (tmp, "/tmp");
+ if (!check_valid_dir ("@TERMUX_PREFIX@/tmp")) {
+ tmp = cob_fast_malloc (strlen("@TERMUX_PREFIX@") + 5U);
+ strcpy (tmp, "@TERMUX_PREFIX@/tmp");
tmpdir = tmp;
}
}