aboutsummaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2020-08-15 19:23:18 +0000
committerSteve Wills <swills@FreeBSD.org>2020-08-15 19:23:18 +0000
commit6e709e833f93c24a0155705570699ce99bd2bc4f (patch)
treee89c0ec271d8c7aa7a32896821039973e8fdd14b /databases
parent657d421009071cfae02a7697b2da2c9d955c4c5f (diff)
downloadports-6e709e833f93c24a0155705570699ce99bd2bc4f.tar.gz
ports-6e709e833f93c24a0155705570699ce99bd2bc4f.zip
databases/pgbouncer: fix usage SO_REUSEPORT_LB
PR: 247956 Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru> Approved by: m.tsatsenko@gmail.com (maintainer)
Notes
Notes: svn path=/head/; revision=545059
Diffstat (limited to 'databases')
-rw-r--r--databases/pgbouncer/Makefile1
-rw-r--r--databases/pgbouncer/files/patch-src_pooler.c25
2 files changed, 26 insertions, 0 deletions
diff --git a/databases/pgbouncer/Makefile b/databases/pgbouncer/Makefile
index ec2267d91c77..0e6ec4c67fd9 100644
--- a/databases/pgbouncer/Makefile
+++ b/databases/pgbouncer/Makefile
@@ -3,6 +3,7 @@
PORTNAME= pgbouncer
PORTVERSION= 1.14.0
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= https://pgbouncer.github.io/downloads/files/${PORTVERSION}/ \
http://pgbouncer.github.io/downloads/files/${PORTVERSION}/
diff --git a/databases/pgbouncer/files/patch-src_pooler.c b/databases/pgbouncer/files/patch-src_pooler.c
new file mode 100644
index 000000000000..6ea7b0c1dc0c
--- /dev/null
+++ b/databases/pgbouncer/files/patch-src_pooler.c
@@ -0,0 +1,25 @@
+--- src/pooler.c.orig 2020-05-26 09:38:55 UTC
++++ src/pooler.c
+@@ -127,16 +127,16 @@ static bool add_listen(int af, const struct sockaddr *
+ * unportable, so perhaps better to avoid it.)
+ */
+ if (af != AF_UNIX && cf_so_reuseport) {
+-#if defined(SO_REUSEPORT)
++#if defined(SO_REUSEPORT_LB)
+ int val = 1;
+- errpos = "setsockopt/SO_REUSEPORT";
+- res = setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, &val, sizeof(val));
++ errpos = "setsockopt/SO_REUSEPORT_LB";
++ res = setsockopt(sock, SOL_SOCKET, SO_REUSEPORT_LB, &val, sizeof(val));
+ if (res < 0)
+ goto failed;
+-#elif defined(SO_REUSEPORT_LB)
++#elif defined(SO_REUSEPORT)
+ int val = 1;
+- errpos = "setsockopt/SO_REUSEPORT_LB";
+- res = setsockopt(sock, SOL_SOCKET, SO_REUSEPORT_LB, &val, sizeof(val));
++ errpos = "setsockopt/SO_REUSEPORT";
++ res = setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, &val, sizeof(val));
+ if (res < 0)
+ goto failed;
+ #else