From 3e5e417060f04e2bf96ef98199014ad2c7b8e203 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sat, 11 Nov 2017 17:58:31 +0100 Subject: [PATCH] BUILD: thread/pipe: fix build without threads MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Marcus Rückert reported that commit d8b3b65 ("BUG/MEDIUM: splice/threads: pipe reuse list was not protected.") broke threadless support. Add the required #ifdef. --- src/pipe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pipe.c b/src/pipe.c index c7ce3c58dc..c161f960f5 100644 --- a/src/pipe.c +++ b/src/pipe.c @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -21,7 +22,9 @@ struct pool_head *pool2_pipe = NULL; struct pipe *pipes_live = NULL; /* pipes which are still ready to use */ +#ifdef USE_THREAD HA_SPINLOCK_T pipes_lock; /* lock used to protect pipes list */ +#endif int pipes_used = 0; /* # of pipes in use (2 fds each) */ int pipes_free = 0; /* # of pipes unused */ -- 2.47.3