blob: ff51f534489ac90b508752a2fe57ae8415ffaab7 [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 +
Andrew Geissler97771a32021-03-05 15:23:11 -060014 src/ssl/helper.cc | 2 ++
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070015 4 files changed, 8 insertions(+)
Andrew Geissler97771a32021-03-05 15:23:11 -060016
17--- a/src/Makefile.am
18+++ b/src/Makefile.am
19@@ -2320,6 +2320,7 @@ tests_test_http_range_LDADD = \
20 $(SSLLIB) \
21 $(KRB5LIBS) \
22 $(LIBCPPUNIT_LIBS) \
23+ $(SYSTEMD_LIBS) \
24 $(COMPAT_LIB) \
25 $(XTRA_LIBS)
26 tests_test_http_range_LDFLAGS = $(LIBADD_DL)
27@@ -2624,6 +2625,7 @@ tests_testHttpRequest_LDADD = \
28 $(SSLLIB) \
29 $(KRB5LIBS) \
30 $(LIBCPPUNIT_LIBS) \
31+ $(SYSTEMD_LIBS) \
32 $(COMPAT_LIB) \
33 $(XTRA_LIBS)
34 tests_testHttpRequest_LDFLAGS = $(LIBADD_DL)
35@@ -3487,6 +3489,7 @@ tests_testURL_LDADD = \
36 $(SSLLIB) \
37 $(KRB5LIBS) \
38 $(LIBCPPUNIT_LIBS) \
39+ $(SYSTEMD_LIBS) \
40 $(COMPAT_LIB) \
41 $(XTRA_LIBS)
42 tests_testURL_LDFLAGS = $(LIBADD_DL)
43@@ -3646,6 +3649,7 @@ nodist_tests_testYesNoNone_SOURCES = \
44 tests_testYesNoNone_LDADD= \
45 base/libbase.la \
46 $(LIBCPPUNIT_LIBS) \
47+ $(SYSTEMD_LIBS) \
48 $(COMPAT_LIB) \
49 $(XTRA_LIBS)
50 tests_testYesNoNone_LDFLAGS = $(LIBADD_DL)
51--- a/src/ip/QosConfig.cc
52+++ b/src/ip/QosConfig.cc
53@@ -21,6 +21,7 @@
54 #include "Parsing.h"
55
56 #include <cerrno>
57+#include <limits>
58
59 CBDATA_CLASS_INIT(acl_tos);
60
61--- a/src/ipc/mem/PageStack.cc
62+++ b/src/ipc/mem/PageStack.cc
63@@ -14,6 +14,7 @@
64 #include "Debug.h"
65 #include "ipc/mem/Page.h"
66 #include "ipc/mem/PageStack.h"
67+#include <limits>
68
69 /// used to mark a stack slot available for storing free page offsets
70 const Ipc::Mem::PageStack::Value Writable = 0;
Andrew Geissler97771a32021-03-05 15:23:11 -060071--- a/src/ssl/helper.cc
72+++ b/src/ssl/helper.cc
73@@ -19,6 +19,8 @@
74 #include "ssl/helper.h"
75 #include "wordlist.h"
76
77+#include <limits>
78+
79 Ssl::CertValidationHelper::LruCache *Ssl::CertValidationHelper::HelperCache = nullptr;
80
81 #if USE_SSL_CRTD
Andrew Geissler97771a32021-03-05 15:23:11 -060082