From 9dd35b131322149ec2f1d1f1348dd65bf917a4ac3621b7153d623b31a1e8452c Mon Sep 17 00:00:00 2001
From: Petr Gajdos <pgajdos@suse.com>
Date: Mon, 3 Feb 2020 08:33:39 +0000
Subject: [PATCH] Accepting request 769110 from home:elvigia:branches:Apache

- define DEFAULT_LISTENBACKLOG=APR_INT32_MAX. We want apache
  to honour net.core.somaxconn sysctl as the mandatory limit.
  the old value of 511 was never used as until v5.4-rc6 it was
  clamped to 128, in current kernels the default limit is 4096.
  Cannot use the apr_socket_listen(.., -1) idiom because the function
  expects a positive integer argument.

OBS-URL: https://build.opensuse.org/request/show/769110
OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=596
---
 apache2.changes | 10 ++++++++++
 apache2.spec    |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/apache2.changes b/apache2.changes
index e9c99da..ca33e40 100644
--- a/apache2.changes
+++ b/apache2.changes
@@ -1,3 +1,13 @@
+-------------------------------------------------------------------
+Fri Jan 31 18:22:09 UTC 2020 - Cristian Rodríguez <crrodriguez@opensuse.org>
+
+- define DEFAULT_LISTENBACKLOG=APR_INT32_MAX. We want apache
+  to honour net.core.somaxconn sysctl as the mandatory limit. 
+  the old value of 511 was never used as until v5.4-rc6 it was 
+  clamped to 128, in current kernels the default limit is 4096. 
+  Cannot use the apr_socket_listen(.., -1) idiom because the function
+  expects a positive integer argument.
+
 -------------------------------------------------------------------
 Mon Jan 20 13:04:23 UTC 2020 - pgajdos@suse.com
 
diff --git a/apache2.spec b/apache2.spec
index 988284f..de80369 100644
--- a/apache2.spec
+++ b/apache2.spec
@@ -451,7 +451,7 @@ for mpm in %{mpms_to_build}; do
 	mv include/ap_config_auto.h.new include/ap_config_auto.h
 	sed -i -e "s@%{_localstatedir}/run@%{runtimedir}@g" include/ap_config_layout.h
 
-	make CFLAGS="%{optflags} -fvisibility=hidden -fPIC -Wall -DDEFAULT_ERRORLOG='\"%{logfiledir}/error_log\"'" %{?_smp_mflags}
+	make CFLAGS="%{optflags} -fvisibility=hidden -fPIC -Wall -DDEFAULT_LISTENBACKLOG=APR_INT32_MAX -DDEFAULT_ERRORLOG='\"%{logfiledir}/error_log\"'" %{?_smp_mflags}
 	make DESTDIR=%{buildroot} install -j1
 
 	# show pathnames in config files