1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
From ae048efc4935512796d67879fc514aa26ab9bcb8 Mon Sep 17 00:00:00 2001
From: Michael Jeanson <mjeanson@efficios.com>
Date: Tue, 15 Apr 2025 11:48:24 -0400
Subject: [PATCH] fix: erroneously removed URCU_TLS() compat in backport
The backport of f7128734172f ("Fix: build with urcu 0.15 on 32bit archs
with 64bit time_t") erroneously removed the URCU_TLS() compat macro
since in master the code has been ported to C++ and uses standard
'thread_local'. This results in build failures on systems using liburcu
built with compat TLS. Revert this part of the backport.
Change-Id: I5e436a38a18d50b399fbb9bcf836cc60a09126db
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
---
diff --git a/src/common/health/health.c b/src/common/health/health.c
index bcf00ea..d24b1bf 100644
--- a/src/common/health/health.c
+++ b/src/common/health/health.c
@@ -263,12 +263,12 @@
assert(type < ha->nr_types);
/* Init TLS state. */
- health_state.last = 0;
- health_state.last_time.tv_sec = 0;
- health_state.last_time.tv_nsec = 0;
- health_state.current = 0;
- health_state.flags = (enum health_flags) 0;
- health_state.type = type;
+ URCU_TLS(health_state).last = 0;
+ URCU_TLS(health_state).last_time.tv_sec = 0;
+ URCU_TLS(health_state).last_time.tv_nsec = 0;
+ URCU_TLS(health_state).current = 0;
+ URCU_TLS(health_state).flags = (enum health_flags) 0;
+ URCU_TLS(health_state).type = type;
/* Add it to the global TLS state list. */
state_lock(ha);
|