Hi Igor,

On Mon, Jun 04, 2018 at 03:18:02PM +0300, Igor Batkanov wrote:
> Hello!
> I've tried to create haproxy 1.8.9 RPM package using rpmbuild and got the
> folowing error:  error: 'all_threads_mask' undeclared (first use in this
> function)
> 

This is a problem when building haproxy without threads support, that has been
fixed, but only after 1.8.9 was released, so it should be part of the next
release.
In the mean while, you can apply the attached patch, it should do the trick.

Regards,

Olivier
>From fbf09c441a4e72c4a690bc7ef25d3374767fe5c5 Mon Sep 17 00:00:00 2001
From: Willy Tarreau <w...@1wt.eu>
Date: Wed, 23 May 2018 19:54:43 +0200
Subject: [PATCH] BUG/BUILD: threads: unbreak build without threads

A few users reported that building without threads was accidently broken
after commit 6b96f72 ("BUG/MEDIUM: pollers: Use a global list for fd
shared between threads.") due to all_threads_mask not being defined.
It's OK to set it to zero as other code parts do when threads are
enabled but only one thread is used.

This needs to be backported to 1.8.

(cherry picked from commit 0cd82e883ef034508ebeef04fd25ffc946e80cfc)
Signed-off-by: Willy Tarreau <w...@1wt.eu>
---
 include/common/hathreads.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/common/hathreads.h b/include/common/hathreads.h
index 86db4d5c..f5827e0f 100644
--- a/include/common/hathreads.h
+++ b/include/common/hathreads.h
@@ -31,6 +31,7 @@ extern THREAD_LOCAL unsigned long tid_bit; /* The bit 
corresponding to the threa
 #ifndef USE_THREAD
 
 #define MAX_THREADS 1
+#define all_threads_mask 0UL
 
 #define __decl_hathreads(decl)
 
-- 
2.14.3

Reply via email to