Update to version 1.7.9.

This commit is contained in:
Dmitry Sivachenko 2017-08-18 08:05:46 +00:00
parent c21043f162
commit 76052d5924
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=448211
3 changed files with 30 additions and 5 deletions

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= haproxy
PORTVERSION= 1.7.8
PORTREVISION= 1
PORTVERSION= 1.7.9
CATEGORIES= net www
MASTER_SITES= http://www.haproxy.org/download/1.7/src/
DISTFILES= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX}

View File

@ -1,5 +1,5 @@
TIMESTAMP = 1499429680
SHA256 (haproxy-1.7.8.tar.gz) = ec90153ccedd20ad4015d3eaf76b502ff1f61b431d54c22b8457b5784a9ae142
SIZE (haproxy-1.7.8.tar.gz) = 1746321
TIMESTAMP = 1503043277
SHA256 (haproxy-1.7.9.tar.gz) = 1072337e54fa188dc6e0cfe3ba4c2200b07082e321cbfe5a0882d85d54db068e
SIZE (haproxy-1.7.9.tar.gz) = 1748159
SHA256 (deviceatlas-enterprise-c-2.1.2_1.tgz) = 984e1ae3147459a4ed0a8d5053d83dd05ce8c5127cd3cb055be35a74e9217372
SIZE (deviceatlas-enterprise-c-2.1.2_1.tgz) = 184432

View File

@ -0,0 +1,26 @@
X-Git-Url: http://git.haproxy.org/?p=haproxy.git;a=blobdiff_plain;f=src%2Fhaproxy.c;h=30e850c4ac4719b71adccb3b6bd41248ef5bb470;hp=7af4ab479c761a43b2fa64d2124388dbf5c21fc3;hb=97148f60b8feec39b76768d1bcfab6d755c12164;hpb=0d00593361b91017b894c4c7d5e24721a7838d6e
diff --git a/src/haproxy.c b/src/haproxy.c
index 7af4ab4..30e850c 100644
--- src/haproxy.c
+++ src/haproxy.c
@@ -2018,7 +2018,18 @@ int main(int argc, char **argv)
proc < LONGBITS && /* only the first 32/64 processes may be pinned */
global.cpu_map[proc]) /* only do this if the process has a CPU map */
#ifdef __FreeBSD__
- cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(unsigned long), (void *)&global.cpu_map[proc]);
+ {
+ cpuset_t cpuset;
+ int i;
+ unsigned long cpu_map = global.cpu_map[proc];
+
+ CPU_ZERO(&cpuset);
+ while ((i = ffsl(cpu_map)) > 0) {
+ CPU_SET(i - 1, &cpuset);
+ cpu_map &= ~(1 << (i - 1));
+ }
+ ret = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(cpuset), &cpuset);
+ }
#else
sched_setaffinity(0, sizeof(unsigned long), (void *)&global.cpu_map[proc]);
#endif