diff mbox series

[meta-oe,02/10] libwebsockets: Fix build with gcc13

Message ID 20230127055440.2108933-2-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,01/10] poco: Do not use std::atomic<bool> | expand

Commit Message

Khem Raj Jan. 27, 2023, 5:54 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...int-mismatch-in-lws_tls_server_abort.patch | 32 +++++++++++++++++++
 .../libwebsockets/libwebsockets_4.3.2.bb      |  3 +-
 2 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-connectivity/libwebsockets/libwebsockets/0001-Fix-Werror-enum-int-mismatch-in-lws_tls_server_abort.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets/0001-Fix-Werror-enum-int-mismatch-in-lws_tls_server_abort.patch b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets/0001-Fix-Werror-enum-int-mismatch-in-lws_tls_server_abort.patch
new file mode 100644
index 0000000000..41d004d9ff
--- /dev/null
+++ b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets/0001-Fix-Werror-enum-int-mismatch-in-lws_tls_server_abort.patch
@@ -0,0 +1,32 @@ 
+From 722e44cb5b74cae206f47a6dc0d985eba8ed1b2e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 26 Jan 2023 17:17:49 -0800
+Subject: [PATCH] Fix -Werror=enum-int-mismatch in
+ lws_tls_server_abort_connection()
+
+GCC 13 is findinf this function signature mismatch.
+
+../git/lib/tls/openssl/openssl-server.c:713:1: error: conflicting types for 'lws_tls_server_abort_connection' due to enum/integer mismatch; have 'int(struct lws *)' [-Werror=enum-int-mismatch]
+
+Upstream-Status: Submitted [https://github.com/warmcat/libwebsockets/pull/2824]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/tls/openssl/openssl-server.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/tls/openssl/openssl-server.c b/lib/tls/openssl/openssl-server.c
+index f2e77324f..43d65e030 100644
+--- a/lib/tls/openssl/openssl-server.c
++++ b/lib/tls/openssl/openssl-server.c
+@@ -699,7 +699,7 @@ lws_tls_server_new_nonblocking(struct lws *wsi, lws_sockfd_type accept_fd)
+ 	return 0;
+ }
+ 
+-int
++enum lws_ssl_capable_status
+ lws_tls_server_abort_connection(struct lws *wsi)
+ {
+ 	if (wsi->tls.use_ssl)
+-- 
+2.39.1
+
diff --git a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb
index d401a187e2..67269b05af 100644
--- a/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb
+++ b/meta-oe/recipes-connectivity/libwebsockets/libwebsockets_4.3.2.bb
@@ -7,7 +7,8 @@  DEPENDS = "zlib"
 
 S = "${WORKDIR}/git"
 SRCREV = "b0a749c8e7a8294b68581ce4feac0e55045eb00b"
-SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.3-stable"
+SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.3-stable \
+           file://0001-Fix-Werror-enum-int-mismatch-in-lws_tls_server_abort.patch"
 
 UPSTREAM_CHECK_URI = "https://github.com/warmcat/${BPN}/releases"
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"