mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
Merge remote-tracking branch 'upstream/master' into better-ca-parse-errors
This commit is contained in:
commit
d3452a5ed6
21 changed files with 398 additions and 146 deletions
|
@ -494,6 +494,7 @@ std::pair<AutoCloseFD, Path> createTempFile(const Path & prefix)
|
|||
{
|
||||
Path tmpl(getEnv("TMPDIR").value_or("/tmp") + "/" + prefix + ".XXXXXX");
|
||||
// Strictly speaking, this is UB, but who cares...
|
||||
// FIXME: use O_TMPFILE.
|
||||
AutoCloseFD fd(mkstemp((char *) tmpl.c_str()));
|
||||
if (!fd)
|
||||
throw SysError("creating temporary file '%s'", tmpl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue