diff --git a/src/net/SocketDescriptor.hxx b/src/net/SocketDescriptor.hxx index d42f36fe9..60f6ba5d1 100644 --- a/src/net/SocketDescriptor.hxx +++ b/src/net/SocketDescriptor.hxx @@ -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 diff --git a/src/system/FileDescriptor.hxx b/src/system/FileDescriptor.hxx index 8e0f9177b..1cc780050 100644 --- a/src/system/FileDescriptor.hxx +++ b/src/system/FileDescriptor.hxx @@ -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; diff --git a/src/system/UniqueFileDescriptor.hxx b/src/system/UniqueFileDescriptor.hxx index 5c1ae09f5..b6703f7ff 100644 --- a/src/system/UniqueFileDescriptor.hxx +++ b/src/system/UniqueFileDescriptor.hxx @@ -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