Skip to content

Commit cc926c3

Browse files
authored
Merge pull request #13283 from NixOS/fix-mingw
Fix mingw build
2 parents de71ceb + 6686b54 commit cc926c3

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

src/libcmd/repl-interacter.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
#include <cstdio>
44

5+
#include <signal.h>
6+
57
#if USE_READLINE
68
#include <readline/history.h>
79
#include <readline/readline.h>

src/libexpr/eval-profiler.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class SampleStack : public EvalProfiler
137137
: state(state)
138138
, sampleInterval(period)
139139
, profileFd([&]() {
140-
AutoCloseFD fd = toDescriptor(open(profileFile.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0660));
140+
AutoCloseFD fd = toDescriptor(open(profileFile.string().c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0660));
141141
if (!fd)
142142
throw SysError("opening file %s", profileFile);
143143
return fd;

src/libutil/include/nix/util/unix-domain-socket.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void bind(Socket fd, const std::string & path);
8080
/**
8181
* Connect to a Unix domain socket.
8282
*/
83-
void connect(Socket fd, const std::string & path);
83+
void connect(Socket fd, const std::filesystem::path & path);
8484

8585
/**
8686
* Connect to a Unix domain socket.

src/libutil/logging.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ std::unique_ptr<Logger> makeJSONLogger(const std::filesystem::path & path, bool
324324
AutoCloseFD fd =
325325
std::filesystem::is_socket(path)
326326
? connect(path)
327-
: toDescriptor(open(path.c_str(), O_CREAT | O_APPEND | O_WRONLY, 0644));
327+
: toDescriptor(open(path.string().c_str(), O_CREAT | O_APPEND | O_WRONLY, 0644));
328328
if (!fd)
329329
throw SysError("opening log file %1%", path);
330330

src/libutil/unix-domain-socket.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ AutoCloseFD createUnixDomainSocket()
2929
return fdSocket;
3030
}
3131

32-
3332
AutoCloseFD createUnixDomainSocket(const Path & path, mode_t mode)
3433
{
3534
auto fdSocket = nix::createUnixDomainSocket();
@@ -100,18 +99,16 @@ static void bindConnectProcHelper(
10099
}
101100
}
102101

103-
104102
void bind(Socket fd, const std::string & path)
105103
{
106104
unlink(path.c_str());
107105

108106
bindConnectProcHelper("bind", ::bind, fd, path);
109107
}
110108

111-
112-
void connect(Socket fd, const std::string & path)
109+
void connect(Socket fd, const std::filesystem::path & path)
113110
{
114-
bindConnectProcHelper("connect", ::connect, fd, path);
111+
bindConnectProcHelper("connect", ::connect, fd, path.string());
115112
}
116113

117114
AutoCloseFD connect(const std::filesystem::path & path)

src/libutil/windows/file-system.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "nix/util/file-system.hh"
2+
#include "nix/util/logging.hh"
23

34
#ifdef _WIN32
45
namespace nix {

src/nix/formatter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ struct CmdFormatterRun : MixFormatter, MixJSON
9292
// Add the path to the flake as an environment variable. This enables formatters to format the entire flake even
9393
// if run from a subdirectory.
9494
StringMap env = getEnv();
95-
env["PRJ_ROOT"] = flakeDir;
95+
env["PRJ_ROOT"] = flakeDir.string();
9696

9797
// Release our references to eval caches to ensure they are persisted to disk, because
9898
// we are about to exec out of this process without running C++ destructors.

0 commit comments

Comments
 (0)