From 807958e9b3fdc2ae49cf31831e6517ce8eee06c6 Mon Sep 17 00:00:00 2001 From: emeric Date: Mon, 26 Apr 2021 12:55:38 +0200 Subject: [PATCH] Fixed fcntl call to make it compile again on non linux. ref #144 --- src/libs/utils/impl/ChildProcess.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/utils/impl/ChildProcess.cpp b/src/libs/utils/impl/ChildProcess.cpp index 82f319fc..e45c0210 100644 --- a/src/libs/utils/impl/ChildProcess.cpp +++ b/src/libs/utils/impl/ChildProcess.cpp @@ -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();