1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-22 17:01:08 +01:00

Fix mingw build

This commit is contained in:
Eelco Dolstra 2025-12-03 19:46:56 +01:00
parent 96d8b54e42
commit c338f9cc5d
16 changed files with 31 additions and 29 deletions

View file

@ -687,7 +687,7 @@ std::filesystem::path createTempDir(const std::filesystem::path & tmpRoot, const
checkInterrupt();
std::filesystem::path tmpDir = makeTempPath(tmpRoot, prefix);
if (mkdir(
tmpDir.c_str()
tmpDir.string().c_str()
#ifndef _WIN32 // TODO abstract mkdir perms for Windows
,
mode
@ -734,7 +734,7 @@ AutoCloseFD createAnonymousTempFile()
std::pair<AutoCloseFD, Path> createTempFile(const Path & prefix)
{
Path tmpl(defaultTempDir() + "/" + prefix + ".XXXXXX");
Path tmpl(defaultTempDir().string() + "/" + prefix + ".XXXXXX");
// Strictly speaking, this is UB, but who cares...
// FIXME: use O_TMPFILE.
// FIXME: Windows should use FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE