From 26a2b65a58c648bbda3c475e6162b8474c71504f Mon Sep 17 00:00:00 2001
From: Tom Barbette <tom.barbette@uclouvain.be>
Date: Thu, 1 Jun 2023 16:17:35 +0200
Subject: [PATCH] Fix compilation with older GCC and IPv6

---
 include/click/ip6address.hh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/click/ip6address.hh b/include/click/ip6address.hh
index f9fd6796f..d56213748 100644
--- a/include/click/ip6address.hh
+++ b/include/click/ip6address.hh
@@ -446,7 +446,12 @@ inline void ip6_follow_eh(const click_ip6* ip6, const unsigned char* end, F fn)
 
 inline void* ip6_find_header(const click_ip6* ip6, const uint8_t type, const unsigned char* end) {
 	unsigned char* pos = 0;
-	auto fnt = [&pos,type] (const uint8_t next, unsigned char* hdr) __attribute__((always_inline)) -> bool {
+	auto fnt = [&pos,type] (const uint8_t next, unsigned char* hdr)
+
+#if defined(__GNUC__) && __GNUC_PREREQ(11,0)
+        __attribute__((always_inline))
+#endif
+        -> bool {
 		if (next == type) {
 			pos = hdr;
 			return 0;
-- 
GitLab