From 58774d25e560c0db81aa7814bce5e4306ecbaaf4 Mon Sep 17 00:00:00 2001
From: Michal Hrusecky <michal.hrusecky@turris.com>
Date: Mon, 26 Feb 2024 12:50:58 +0100
Subject: [PATCH] packages/squid: Fix build on Turris 1.x

---
 .../0020-net-squid-Enforce-std-c-17.patch     | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 patches/packages/to-upstream/0020-net-squid-Enforce-std-c-17.patch

diff --git a/patches/packages/to-upstream/0020-net-squid-Enforce-std-c-17.patch b/patches/packages/to-upstream/0020-net-squid-Enforce-std-c-17.patch
new file mode 100644
index 000000000..f317ab421
--- /dev/null
+++ b/patches/packages/to-upstream/0020-net-squid-Enforce-std-c-17.patch
@@ -0,0 +1,26 @@
+From ded73a42a6054a3cd01f3185b4d380deeed931e2 Mon Sep 17 00:00:00 2001
+From: Michal Hrusecky <michal@hrusecky.net>
+Date: Mon, 26 Feb 2024 12:48:07 +0100
+Subject: [PATCH] net/squid: Enforce std=c++17
+
+Squid requires c++17 to compile successfully, so enforcing it. This
+fixes build with gcc 8.
+---
+ net/squid/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/net/squid/Makefile b/net/squid/Makefile
+index 03fe5ee3b..ccb191a12 100644
+--- a/net/squid/Makefile
++++ b/net/squid/Makefile
+@@ -109,6 +109,7 @@ CONFIGURE_VARS += \
+ 	ac_cv_epoll_works=yes
+ 
+ TARGET_CFLAGS += -Wno-error
++TARGET_CXXFLAGS += -Wno-error -std=c++17
+ TARGET_LDFLAGS += -latomic
+ 
+ define Package/squid/install
+-- 
+2.43.2
+
-- 
GitLab