From a4d80f898f63614ee523b301ad3a66c6ff37ee0a Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Tue, 21 May 2019 14:05:45 +0200 Subject: [PATCH] BUG/MEDIUM: threads: Fix build for 32bits arch with dwcas. _HA_ATOMIC_DWCAS() only exists in 2.0, not in 1.9, so use HA_ATOMIC_DWCAS. This should fix build on 32bits arches that have a double-word CAS implemented (currently only armv7). This is a direct commit to 1.9, as the problem doesn't exist in 2.0, and it shouldn't be backported to 1.8. --- src/fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fd.c b/src/fd.c index 05caa019..769e10ed 100644 --- a/src/fd.c +++ b/src/fd.c @@ -264,7 +264,7 @@ lock_self: #ifdef HA_CAS_IS_8B unlikely(!HA_ATOMIC_CAS(((void **)(void *)&_GET_NEXT(fd, off)), ((void **)(void *)&cur_list), (*(void **)(void *)&next_list)))) #else - unlikely(!_HA_ATOMIC_DWCAS(((void **)(void *)&_GET_NEXT(fd, off)), ((void **)(void *)&cur_list), (*(void **)(void *)&next_list)))) + unlikely(!HA_ATOMIC_DWCAS(((void **)(void *)&_GET_NEXT(fd, off)), ((void **)(void *)&cur_list), (*(void **)(void *)&next_list)))) #endif ; next = cur_list.next; -- 2.21.0