From 9c5d4fb5a4d2f3157b9b9e4fc2a7a0457adccdf5 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 8 Jun 2022 18:12:08 -0700 Subject: [PATCH] libwebsockets: fix compilation with GCC12 Upstream backport. Signed-off-by: Rosen Penev --- libs/libwebsockets/Makefile | 2 +- libs/libwebsockets/patches/020-gcc12.patch | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 libs/libwebsockets/patches/020-gcc12.patch diff --git a/libs/libwebsockets/Makefile b/libs/libwebsockets/Makefile index f43727993..29c43ce95 100644 --- a/libs/libwebsockets/Makefile +++ b/libs/libwebsockets/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libwebsockets PKG_VERSION:=4.2.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) diff --git a/libs/libwebsockets/patches/020-gcc12.patch b/libs/libwebsockets/patches/020-gcc12.patch new file mode 100644 index 000000000..ee6dfe5ad --- /dev/null +++ b/libs/libwebsockets/patches/020-gcc12.patch @@ -0,0 +1,21 @@ +From 6352fee2194a41179a808e9e2b805e0f5c86f8cf Mon Sep 17 00:00:00 2001 +From: Andy Green +Date: Sun, 16 Jan 2022 06:49:38 +0000 +Subject: [PATCH] sort-dns: fix scope comparison + +https://github.com/warmcat/libwebsockets/issues/2537 +--- + lib/core-net/client/sort-dns.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/lib/core-net/client/sort-dns.c ++++ b/lib/core-net/client/sort-dns.c +@@ -406,7 +406,7 @@ lws_sort_dns_dcomp(const lws_dns_sort_t + */ + + scopea = lws_ipv6_unicast_scope(to_v6_sa(&da->dest)); +- scopeb = lws_ipv6_unicast_scope(to_v6_sa(&db)); ++ scopeb = lws_ipv6_unicast_scope(to_v6_sa(&db->dest)); + scope_srca = lws_ipv6_unicast_scope(to_v6_sa(&da->source)); + scope_srcb = lws_ipv6_unicast_scope(to_v6_sa(&db->source)); +