mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
databases/pgbouncer: fix usage SO_REUSEPORT_LB
PR: 247956 Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru> Approved by: m.tsatsenko@gmail.com (maintainer)
This commit is contained in:
parent
657d421009
commit
6e709e833f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=545059
2 changed files with 26 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
PORTNAME= pgbouncer
|
PORTNAME= pgbouncer
|
||||||
PORTVERSION= 1.14.0
|
PORTVERSION= 1.14.0
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= databases
|
CATEGORIES= databases
|
||||||
MASTER_SITES= https://pgbouncer.github.io/downloads/files/${PORTVERSION}/ \
|
MASTER_SITES= https://pgbouncer.github.io/downloads/files/${PORTVERSION}/ \
|
||||||
http://pgbouncer.github.io/downloads/files/${PORTVERSION}/
|
http://pgbouncer.github.io/downloads/files/${PORTVERSION}/
|
||||||
|
|
25
databases/pgbouncer/files/patch-src_pooler.c
Normal file
25
databases/pgbouncer/files/patch-src_pooler.c
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue