mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-16 23:57:11 +00:00
community/haproxy: fix
This commit is contained in:
parent
53ce176c8a
commit
a4ff9eb2b5
2 changed files with 36 additions and 2 deletions
|
@ -0,0 +1,30 @@
|
|||
From a4d80f898f63614ee523b301ad3a66c6ff37ee0a Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Houchard <cognet@ci0.org>
|
||||
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
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - explicitly link v5/v6 with libatomic
|
||||
# - upstream armv7 fix
|
||||
|
||||
pkgname=haproxy
|
||||
pkgver=1.9.8
|
||||
|
@ -22,17 +23,20 @@ install=haproxy.install
|
|||
source=(https://haproxy.org/download/${pkgver%.*}/src/haproxy-$pkgver.tar.gz
|
||||
haproxy.cfg
|
||||
haproxy.sysusers
|
||||
0001-Use-CFLAGS-and-LDFLAGS-when-building-contrib.patch)
|
||||
0001-Use-CFLAGS-and-LDFLAGS-when-building-contrib.patch
|
||||
0001-BUG-MEDIUM-threads-Fix-build-for-32bits-arch-with-dw.patch)
|
||||
|
||||
md5sums=('efd17947e2c6d1fb26a0987968b1bc6a'
|
||||
'27941f31d25d5629f4bdef6bc4b2555a'
|
||||
'2f00e81ee2f3f6e51a0cd9acc6f3ff3e'
|
||||
'5343b0563c2e0e59110a84e2e611d94f')
|
||||
'5343b0563c2e0e59110a84e2e611d94f'
|
||||
'16b654df6333fee3a04e1f55038950e9')
|
||||
|
||||
prepare() {
|
||||
cd haproxy-$pkgver
|
||||
|
||||
patch -p1 <"$srcdir"/0001-Use-CFLAGS-and-LDFLAGS-when-building-contrib.patch
|
||||
patch -p1 <"$srcdir"/0001-BUG-MEDIUM-threads-Fix-build-for-32bits-arch-with-dw.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
|
Loading…
Reference in a new issue