blob: 28a410c26f91b4a565a106405fb08bcde2aef92e [file] [log] [blame]
Andrew Geissler97771a32021-03-05 15:23:11 -06001From 1f8b5f0e1cc27634a7310be4c9674112f919d974 Mon Sep 17 00:00:00 2001
2From: uhliarik <luhliari@redhat.com>
3Date: Thu, 18 Feb 2021 01:08:40 +0000
4Subject: [PATCH] Fix build on Fedora Rawhide (#772)
5
6* add SYSTEMD_LIBS to all binaries using client_side.cc, fixing linking
7* add `<limits>` to all sources using std::numeric_limits, fixing gcc-11
8 builds
9---
10Upstream-Status: Backport [https://github.com/kraj/squid/commit/1f8b5f0e1cc27634a7310be4c9674112f919d974]
11 src/Makefile.am | 4 ++++
12 src/ip/QosConfig.cc | 1 +
13 src/ipc/mem/PageStack.cc | 1 +
14 src/proxyp/Parser.cc | 1 +
15 src/security/ServerOptions.cc | 2 ++
16 src/ssl/helper.cc | 2 ++
17 6 files changed, 11 insertions(+)
18
19--- a/src/Makefile.am
20+++ b/src/Makefile.am
21@@ -2320,6 +2320,7 @@ tests_test_http_range_LDADD = \
22 $(SSLLIB) \
23 $(KRB5LIBS) \
24 $(LIBCPPUNIT_LIBS) \
25+ $(SYSTEMD_LIBS) \
26 $(COMPAT_LIB) \
27 $(XTRA_LIBS)
28 tests_test_http_range_LDFLAGS = $(LIBADD_DL)
29@@ -2624,6 +2625,7 @@ tests_testHttpRequest_LDADD = \
30 $(SSLLIB) \
31 $(KRB5LIBS) \
32 $(LIBCPPUNIT_LIBS) \
33+ $(SYSTEMD_LIBS) \
34 $(COMPAT_LIB) \
35 $(XTRA_LIBS)
36 tests_testHttpRequest_LDFLAGS = $(LIBADD_DL)
37@@ -3487,6 +3489,7 @@ tests_testURL_LDADD = \
38 $(SSLLIB) \
39 $(KRB5LIBS) \
40 $(LIBCPPUNIT_LIBS) \
41+ $(SYSTEMD_LIBS) \
42 $(COMPAT_LIB) \
43 $(XTRA_LIBS)
44 tests_testURL_LDFLAGS = $(LIBADD_DL)
45@@ -3646,6 +3649,7 @@ nodist_tests_testYesNoNone_SOURCES = \
46 tests_testYesNoNone_LDADD= \
47 base/libbase.la \
48 $(LIBCPPUNIT_LIBS) \
49+ $(SYSTEMD_LIBS) \
50 $(COMPAT_LIB) \
51 $(XTRA_LIBS)
52 tests_testYesNoNone_LDFLAGS = $(LIBADD_DL)
53--- a/src/ip/QosConfig.cc
54+++ b/src/ip/QosConfig.cc
55@@ -21,6 +21,7 @@
56 #include "Parsing.h"
57
58 #include <cerrno>
59+#include <limits>
60
61 CBDATA_CLASS_INIT(acl_tos);
62
63--- a/src/ipc/mem/PageStack.cc
64+++ b/src/ipc/mem/PageStack.cc
65@@ -14,6 +14,7 @@
66 #include "Debug.h"
67 #include "ipc/mem/Page.h"
68 #include "ipc/mem/PageStack.h"
69+#include <limits>
70
71 /// used to mark a stack slot available for storing free page offsets
72 const Ipc::Mem::PageStack::Value Writable = 0;
73--- a/src/security/ServerOptions.cc
74+++ b/src/security/ServerOptions.cc
75@@ -24,6 +24,8 @@
76 #endif
77 #endif
78
79+#include <limits>
80+
81 Security::ServerOptions &
82 Security::ServerOptions::operator =(const Security::ServerOptions &old) {
83 if (this != &old) {
84--- a/src/ssl/helper.cc
85+++ b/src/ssl/helper.cc
86@@ -19,6 +19,8 @@
87 #include "ssl/helper.h"
88 #include "wordlist.h"
89
90+#include <limits>
91+
92 Ssl::CertValidationHelper::LruCache *Ssl::CertValidationHelper::HelperCache = nullptr;
93
94 #if USE_SSL_CRTD
95--- a/src/acl/ConnMark.cc
96+++ b/src/acl/ConnMark.cc
97@@ -16,6 +16,8 @@
98 #include "http/Stream.h"
99 #include "sbuf/Stream.h"
100
101+#include <limits>
102+
103 bool
104 Acl::ConnMark::empty() const
105 {