Commit d4ce9c0d authored by Max Kellermann's avatar Max Kellermann

system/FileDescriptor: no-op implementation of *CloseOnExec() on Windows

Fixes the NFS client build, closes #305.
parent 680fdb03
......@@ -90,11 +90,12 @@ public:
return SocketDescriptor(FileDescriptor::Undefined());
}
using FileDescriptor::EnableCloseOnExec;
using FileDescriptor::DisableCloseOnExec;
#ifndef _WIN32
using FileDescriptor::SetNonBlocking;
using FileDescriptor::SetBlocking;
using FileDescriptor::EnableCloseOnExec;
using FileDescriptor::DisableCloseOnExec;
using FileDescriptor::Duplicate;
using FileDescriptor::Close;
#else
......
......@@ -115,7 +115,10 @@ public:
static bool CreatePipe(FileDescriptor &r, FileDescriptor &w) noexcept;
#ifndef _WIN32
#ifdef _WIN32
void EnableCloseOnExec() noexcept {}
void DisableCloseOnExec() noexcept {}
#else
static bool CreatePipeNonBlock(FileDescriptor &r,
FileDescriptor &w) noexcept;
......
......@@ -97,14 +97,15 @@ public:
using FileDescriptor::SetNonBlocking;
using FileDescriptor::SetBlocking;
using FileDescriptor::EnableCloseOnExec;
using FileDescriptor::DisableCloseOnExec;
using FileDescriptor::Duplicate;
using FileDescriptor::CheckDuplicate;
static bool CreatePipe(FileDescriptor &r, FileDescriptor &w);
#endif
using FileDescriptor::EnableCloseOnExec;
using FileDescriptor::DisableCloseOnExec;
#ifdef USE_EVENTFD
using FileDescriptor::CreateEventFD;
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment