aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/squid/files/0001-Fix-build-on-Fedora-Rawhide-772.patch
blob: ff51f534489ac90b508752a2fe57ae8415ffaab7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
From 1f8b5f0e1cc27634a7310be4c9674112f919d974 Mon Sep 17 00:00:00 2001
From: uhliarik <luhliari@redhat.com>
Date: Thu, 18 Feb 2021 01:08:40 +0000
Subject: [PATCH] Fix build on Fedora Rawhide (#772)

* add SYSTEMD_LIBS to all binaries using client_side.cc, fixing linking
* add `<limits>` to all sources using std::numeric_limits, fixing gcc-11
  builds
---
Upstream-Status: Backport [https://github.com/kraj/squid/commit/1f8b5f0e1cc27634a7310be4c9674112f919d974]
 src/Makefile.am               | 4 ++++
 src/ip/QosConfig.cc           | 1 +
 src/ipc/mem/PageStack.cc      | 1 +
 src/ssl/helper.cc             | 2 ++
 4 files changed, 8 insertions(+)

--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2320,6 +2320,7 @@ tests_test_http_range_LDADD = \
 	$(SSLLIB) \
 	$(KRB5LIBS) \
 	$(LIBCPPUNIT_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(COMPAT_LIB) \
 	$(XTRA_LIBS)
 tests_test_http_range_LDFLAGS = $(LIBADD_DL)
@@ -2624,6 +2625,7 @@ tests_testHttpRequest_LDADD = \
 	$(SSLLIB) \
 	$(KRB5LIBS) \
 	$(LIBCPPUNIT_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(COMPAT_LIB) \
 	$(XTRA_LIBS)
 tests_testHttpRequest_LDFLAGS = $(LIBADD_DL)
@@ -3487,6 +3489,7 @@ tests_testURL_LDADD = \
 	$(SSLLIB) \
 	$(KRB5LIBS) \
 	$(LIBCPPUNIT_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(COMPAT_LIB) \
 	$(XTRA_LIBS)
 tests_testURL_LDFLAGS = $(LIBADD_DL)
@@ -3646,6 +3649,7 @@ nodist_tests_testYesNoNone_SOURCES = \
 tests_testYesNoNone_LDADD= \
 	base/libbase.la \
 	$(LIBCPPUNIT_LIBS) \
+	$(SYSTEMD_LIBS) \
 	$(COMPAT_LIB) \
 	$(XTRA_LIBS)
 tests_testYesNoNone_LDFLAGS = $(LIBADD_DL)
--- a/src/ip/QosConfig.cc
+++ b/src/ip/QosConfig.cc
@@ -21,6 +21,7 @@
 #include "Parsing.h"
 
 #include <cerrno>
+#include <limits>
 
 CBDATA_CLASS_INIT(acl_tos);
 
--- a/src/ipc/mem/PageStack.cc
+++ b/src/ipc/mem/PageStack.cc
@@ -14,6 +14,7 @@
 #include "Debug.h"
 #include "ipc/mem/Page.h"
 #include "ipc/mem/PageStack.h"
+#include <limits>
 
 /// used to mark a stack slot available for storing free page offsets
 const Ipc::Mem::PageStack::Value Writable = 0;
--- a/src/ssl/helper.cc
+++ b/src/ssl/helper.cc
@@ -19,6 +19,8 @@
 #include "ssl/helper.h"
 #include "wordlist.h"
 
+#include <limits>
+
 Ssl::CertValidationHelper::LruCache *Ssl::CertValidationHelper::HelperCache = nullptr;
 
 #if USE_SSL_CRTD