Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/libcmd/repl-interacter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include <cstdio>

#include <signal.h>

#if USE_READLINE
#include <readline/history.h>
#include <readline/readline.h>
Expand Down
2 changes: 1 addition & 1 deletion src/libexpr/eval-profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class SampleStack : public EvalProfiler
: state(state)
, sampleInterval(period)
, profileFd([&]() {
AutoCloseFD fd = toDescriptor(open(profileFile.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0660));
AutoCloseFD fd = toDescriptor(open(profileFile.string().c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0660));
if (!fd)
throw SysError("opening file %s", profileFile);
return fd;
Expand Down
2 changes: 1 addition & 1 deletion src/libutil/include/nix/util/unix-domain-socket.hh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void bind(Socket fd, const std::string & path);
/**
* Connect to a Unix domain socket.
*/
void connect(Socket fd, const std::string & path);
void connect(Socket fd, const std::filesystem::path & path);

/**
* Connect to a Unix domain socket.
Expand Down
2 changes: 1 addition & 1 deletion src/libutil/logging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ std::unique_ptr<Logger> makeJSONLogger(const std::filesystem::path & path, bool
AutoCloseFD fd =
std::filesystem::is_socket(path)
? connect(path)
: toDescriptor(open(path.c_str(), O_CREAT | O_APPEND | O_WRONLY, 0644));
: toDescriptor(open(path.string().c_str(), O_CREAT | O_APPEND | O_WRONLY, 0644));
if (!fd)
throw SysError("opening log file %1%", path);

Expand Down
7 changes: 2 additions & 5 deletions src/libutil/unix-domain-socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ AutoCloseFD createUnixDomainSocket()
return fdSocket;
}


AutoCloseFD createUnixDomainSocket(const Path & path, mode_t mode)
{
auto fdSocket = nix::createUnixDomainSocket();
Expand Down Expand Up @@ -100,18 +99,16 @@ static void bindConnectProcHelper(
}
}


void bind(Socket fd, const std::string & path)
{
unlink(path.c_str());

bindConnectProcHelper("bind", ::bind, fd, path);
}


void connect(Socket fd, const std::string & path)
void connect(Socket fd, const std::filesystem::path & path)
{
bindConnectProcHelper("connect", ::connect, fd, path);
bindConnectProcHelper("connect", ::connect, fd, path.string());
}

AutoCloseFD connect(const std::filesystem::path & path)
Expand Down
1 change: 1 addition & 0 deletions src/libutil/windows/file-system.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "nix/util/file-system.hh"
#include "nix/util/logging.hh"

#ifdef _WIN32
namespace nix {
Expand Down
2 changes: 1 addition & 1 deletion src/nix/formatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ struct CmdFormatterRun : MixFormatter, MixJSON
// Add the path to the flake as an environment variable. This enables formatters to format the entire flake even
// if run from a subdirectory.
StringMap env = getEnv();
env["PRJ_ROOT"] = flakeDir;
env["PRJ_ROOT"] = flakeDir.string();

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