From: Christopher Faulet Date: Tue, 14 Nov 2017 09:16:04 +0000 (+0100) Subject: BUG/MINOR: threads: tid_bit must be a unsigned long X-Git-Tag: v1.8-rc4~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9a896e09e8d56523f1af57cf454534b11e0fbe7;p=thirdparty%2Fhaproxy.git BUG/MINOR: threads: tid_bit must be a unsigned long This is specific to threads, no backport is needed. --- diff --git a/include/common/hathreads.h b/include/common/hathreads.h index 31d0f533b9..9782ca9a07 100644 --- a/include/common/hathreads.h +++ b/include/common/hathreads.h @@ -26,7 +26,7 @@ #define MAX_THREADS_MASK ((unsigned long)-1) extern THREAD_LOCAL unsigned int tid; /* The thread id */ -extern THREAD_LOCAL unsigned int tid_bit; /* The bit corresponding to the thread id */ +extern THREAD_LOCAL unsigned long tid_bit; /* The bit corresponding to the thread id */ #ifndef USE_THREAD diff --git a/src/hathreads.c b/src/hathreads.c index 2856a9f24c..eb9cd3fcec 100644 --- a/src/hathreads.c +++ b/src/hathreads.c @@ -18,8 +18,8 @@ #include #include -THREAD_LOCAL unsigned int tid = 0; -THREAD_LOCAL unsigned int tid_bit = (1UL << 0); +THREAD_LOCAL unsigned int tid = 0; +THREAD_LOCAL unsigned long tid_bit = (1UL << 0); #ifdef USE_THREAD