On Tue, Sep 11, 2018 at 10:04:47PM +0200, Cyril Bonté wrote: > Hi William, > > I won't have time to provide a patch tonight and maybe you're still > reorganizing some code. > My compilation test scripts are reporting that commit #f9cc07c25b broke > the compilation when threads are disabled (USE_THREAD=) : > > src/haproxy.c: In function ‘mworker_loop’: > src/haproxy.c:870:6: error: lvalue required as left operand of assignment > tid = 0; > ^ > > http://git.haproxy.org/?p=haproxy.git;a=commit;h=f9cc07c25beab93700044955d97117465b4852ae > > I prefer to report the issue as I'm not sure you've seen it ;-) >
Hi Cyril, Thanks for the report, removing the initialisation completely shouldn't be a problem. Patch attached. -- William Lallemand
>From b81a9a2a80e4340f9cf3a3357dcbae348268f437 Mon Sep 17 00:00:00 2001 From: William Lallemand <[email protected]> Date: Wed, 12 Sep 2018 11:57:19 +0200 Subject: [PATCH] BUILD: fix build without thread MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cyril Bonté reported that commit f9cc07c25b broke the build without thread. We don't need to initialise tid = 0 in mworker_loop, so we could completely remove it. --- src/haproxy.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c index d59635629..3bf1f3bcd 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -867,8 +867,6 @@ static void mworker_loop() mworker_catch_sigchld(NULL); /* ensure we clean the children in case some SIGCHLD were lost */ - tid = 0; - global.nbthread = 1; relative_pid = 1; pid_bit = 1; -- 2.16.4

