aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-03-13 05:31:03 -0700
committerEelco Dolstra <edolstra@gmail.com>2023-03-13 05:31:03 -0700
commitfcd0b0fbd5449c665d6ae80e4ae6393e80fd6d1a (patch)
tree13e3e6ad5c6712689862dfb864c200f3d7177e13
parent208c8551249361d2383b44123b4ad156218c351b (diff)
Fix macOS warning
-rw-r--r--src/libutil/util.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 17ccf3554..c1de4fb33 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -1070,12 +1070,14 @@ static pid_t doFork(bool allowVfork, std::function<void()> fun)
}
+#if __linux__
static int childEntry(void * arg)
{
auto main = (std::function<void()> *) arg;
(*main)();
return 1;
}
+#endif
pid_t startProcess(std::function<void()> fun, const ProcessOptions & options)