Fixed fcntl call to make it compile again on non linux. ref #144

This commit is contained in:
emeric
2021-04-26 12:55:38 +02:00
parent b45b30ded4
commit 807958e9b3
+2 -1
View File
@@ -71,11 +71,12 @@ ChildProcess::ChildProcess(boost::asio::io_context& ioContext, const std::filesy
{
const std::size_t pipeSize {65536*8};
#if defined(__linux__) && defined(F_SETPIPE_SZ)
if (fcntl(pipe[0], F_SETPIPE_SZ, pipeSize) == -1)
throw SystemException {errno, "fcntl failed!"};
if (fcntl(pipe[1], F_SETPIPE_SZ, pipeSize) == -1)
throw SystemException {errno, "fcntl failed!"};
#endif
}
res = fork();