mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +00:00
Fix Landlock Make crash when TMPDIR isn't defined
This commit is contained in:
parent
f531acc8f9
commit
f9c9a323fe
1 changed files with 4 additions and 1 deletions
5
third_party/make/job.c
vendored
5
third_party/make/job.c
vendored
|
@ -413,7 +413,10 @@ get_target_variable (const char *name,
|
||||||
char *
|
char *
|
||||||
get_tmpdir (struct file *file)
|
get_tmpdir (struct file *file)
|
||||||
{
|
{
|
||||||
return strdup (get_target_variable (STRING_SIZE_TUPLE ("TMPDIR"), file, 0));
|
const char *tmpdir;
|
||||||
|
tmpdir = get_target_variable (STRING_SIZE_TUPLE ("TMPDIR"), file, 0);
|
||||||
|
if (!tmpdir) tmpdir = kTmpPath;
|
||||||
|
return strdup (tmpdir);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
|
Loading…
Reference in a new issue