1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 15:32:43 +01:00

Fix mingw build

https://hydra.nixos.org/build/298331457
This commit is contained in:
Eelco Dolstra 2025-05-27 23:44:47 +02:00
parent de71cebc3a
commit 6686b54077
7 changed files with 9 additions and 9 deletions

View file

@ -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.

View file

@ -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);

View file

@ -29,7 +29,6 @@ AutoCloseFD createUnixDomainSocket()
return fdSocket;
}
AutoCloseFD createUnixDomainSocket(const Path & path, mode_t mode)
{
auto fdSocket = nix::createUnixDomainSocket();
@ -100,7 +99,6 @@ static void bindConnectProcHelper(
}
}
void bind(Socket fd, const std::string & path)
{
unlink(path.c_str());
@ -108,10 +106,9 @@ void bind(Socket fd, const std::string & path)
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)

View file

@ -1,4 +1,5 @@
#include "nix/util/file-system.hh"
#include "nix/util/logging.hh"
#ifdef _WIN32
namespace nix {