svn commit: r545059 - in head/databases/pgbouncer: . files

Steve Wills swills at FreeBSD.org
Sat Aug 15 19:23:19 UTC 2020


Author: swills
Date: Sat Aug 15 19:23:18 2020
New Revision: 545059
URL: https://svnweb.freebsd.org/changeset/ports/545059

Log:
  databases/pgbouncer: fix usage SO_REUSEPORT_LB
  
  PR:		247956
  Submitted by:	Dmitry Wagin <dmitry.wagin at ya.ru>
  Approved by:	m.tsatsenko at gmail.com (maintainer)

Added:
  head/databases/pgbouncer/files/patch-src_pooler.c   (contents, props changed)
Modified:
  head/databases/pgbouncer/Makefile   (contents, props changed)

Modified: head/databases/pgbouncer/Makefile
==============================================================================
--- head/databases/pgbouncer/Makefile	Sat Aug 15 18:58:05 2020	(r545058)
+++ head/databases/pgbouncer/Makefile	Sat Aug 15 19:23:18 2020	(r545059)
@@ -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}/

Added: head/databases/pgbouncer/files/patch-src_pooler.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/pgbouncer/files/patch-src_pooler.c	Sat Aug 15 19:23:18 2020	(r545059)
@@ -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


More information about the svn-ports-all mailing list