package/libwebsockets: bump to version 5.1.0
PATCH 1/1 package/libwebsockets: bump to version 5.1.0
There are no release notes for the 5.x series; the git history is at
https://github.com/warmcat/libwebsockets/compare/v4.5.8...v5.1.0
Version 5.0.0 added mbedtls 4 support, and 5.1.0 brings the mbedtls 4 fixes on top of it, so libwebsockets now builds and works with mbedtls 4.1.
Drop patch 0001, which was applied upstream in a reworked form as commit 8a0dbfba1 ("cmake: only use libatomic if it provides the 64-bit atomics").
HTTP/3 (QUIC) is now enabled by default. With OpenSSL, it forces the new GnuTLS backend on, and with mbedtls it requires an mbedtls carrying the libwebsockets QUIC patches, so the configure step fails either way:
LWS_ROLE_QUIC (HTTP/3) requires mbedtls to be patched with QUIC support.
Disable HTTP/3 and QUIC, which version 4.5.8 did not have either.
LWS_PRE, the headroom required before buffers passed to lws_write(), grew on 64-bit builds, and the soname changed from libwebsockets.so.21 to libwebsockets.so.23.
The LICENSE file lists two more files that are already MIT licensed (lib/misc/dht and lib/misc/qrcodegen.c), hence the hash change.
--- ...ly-link-libatomic-if-it-is-available.patch | 61 ------------------- package/libwebsockets/libwebsockets.hash | 4 +- package/libwebsockets/libwebsockets.mk | 6 +- 3 files changed, 7 insertions(+), 64 deletions(-) delete mode 100644 package/libwebsockets/0001-cmake-openssl-only-link-libatomic-if-it-is-available.patch
package/libwebsockets/0001-cmake-openssl-only-link-libatomic-if-it-is-available.patch deleted +0 -61
@@ -1,61 +0,0 @@ -From e0480a47e95a0d74c826926ae6bfef14fc8d988f Mon Sep 17 00:00:00 2001 -From: Yegor Yefremov <[email protected]> -Date: Tue, 27 Oct 2026 08:47:29 +0100 -Subject: [PATCH] cmake: openssl: only link libatomic if it is available - -Commit 09aade8c9 ("cmake: openssl: Added check for atomic library") -adds -latomic to CMAKE_REQUIRED_LIBRARIES whenever 64-bit atomics -don't work out of the box, without checking that libatomic exists. - -Some toolchains don't provide libatomic at all, e.g. GCC toolchains -built without thread support, as libatomic relies on pthreads. On such -a toolchain for a CPU without native 64-bit atomics (e.g. ARMv5), every -OpenSSL API probe then fails to link: - - ld: cannot find -latomic: No such file or directory - -so lws believes it deals with a pre-1.1 OpenSSL and the build fails: - - include/libwebsockets/lws-genhash.h:93:18: error: field 'ctx' has incomplete type - 93 | HMAC_CTX ctx; - | ^~~ - -Only use libatomic if linking against it makes the 64-bit atomics -test pass. - -Assisted-by: Claude:claude-opus-5-5 -Upstream: sent to Andy Green <[email protected]> on 2026-10-27 -Signed-off-by: Yegor Yefremov <[email protected]> ---- - lib/tls/CMakeLists.txt | 15 +++++++++++---- - 1 file changed, 11 insertions(+), 4 deletions(-) - -diff --git a/lib/tls/CMakeLists.txt b/lib/tls/CMakeLists.txt -index d91c3dab6..9060d32fe 100644 ---- a/lib/tls/CMakeLists.txt -+++ b/lib/tls/CMakeLists.txt -@@ -564,10 +564,17 @@ if (DEFINED LIB_LIST) - endif() - if(UNIX AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")) - check_c_source_compiles("int main() { long long x = 0; __atomic_fetch_add(&x, 1, __ATOMIC_SEQ_CST); return 0; }" HAVE_WORKING_ATOMIC_64) -- if(HAVE_WORKING_ATOMIC_64) -- set(LWS_ATOMIC_LIB "") -- else() -- set(LWS_ATOMIC_LIB atomic) -+ set(LWS_ATOMIC_LIB "") -+ if(NOT HAVE_WORKING_ATOMIC_64) -+ # libatomic is not always available (eg, toolchains without threads), -+ # only use it if it actually provides the 64-bit atomics -+ set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES}) -+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} atomic) -+ check_c_source_compiles("int main() { long long x = 0; __atomic_fetch_add(&x, 1, __ATOMIC_SEQ_CST); return 0; }" HAVE_WORKING_ATOMIC_64_WITH_LIBATOMIC) -+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE}) -+ if(HAVE_WORKING_ATOMIC_64_WITH_LIBATOMIC) -+ set(LWS_ATOMIC_LIB atomic) -+ endif() - endif() - endif() - if (UNIX AND NOT (${CMAKE_SYSTEM_NAME} MATCHES "QNX")) --- -2.34.1 -
package/libwebsockets/libwebsockets.hash +2 -2
@@ -1,3 +1,3 @@ # Locally computed: -sha256 b6ade658f4af3a823d0dc806ae5ef0623f0f4f5e2aeb895a0f77c4783840c30e libwebsockets-4.5.8.tar.gz -sha256 6ff2868dd9d9e251de27574342663f4773a8c2f954128899eb6f3c2ba9d9a245 LICENSE +sha256 9acbba00aaa9e6178ae09c6f920d95449b527c1417e81d2cdd4103bc6d64d13f libwebsockets-5.1.0.tar.gz +sha256 e98c88a3de53b32c75d8130e29f5f3c4cdd89fb0c002091748e7d2d626dcb914 LICENSE
package/libwebsockets/libwebsockets.mk +5 -1
@@ -4,14 +4,18 @@ # ################################################################################ -LIBWEBSOCKETS_VERSION = 4.5.8 +LIBWEBSOCKETS_VERSION = 5.1.0 LIBWEBSOCKETS_SITE = $(call github,warmcat,libwebsockets,v$(LIBWEBSOCKETS_VERSION)) LIBWEBSOCKETS_LICENSE = MIT with exceptions LIBWEBSOCKETS_LICENSE_FILES = LICENSE LIBWEBSOCKETS_DEPENDENCIES = zlib LIBWEBSOCKETS_INSTALL_STAGING = YES +# HTTP/3 (QUIC) is enabled by default, but needs GnuTLS when OpenSSL +# is used, and an mbedtls with the libwebsockets QUIC patches. LIBWEBSOCKETS_CONF_OPTS = \ -DDISABLE_WERROR=ON \ + -DLWS_WITH_HTTP3=OFF \ + -DLWS_ROLE_QUIC=OFF \ -DLWS_WITHOUT_TESTAPPS=ON \ -DLWS_IPV6=ON \ -DLWS_UNIX_SOCK=ON \
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 24 lines · Yegor Yefremov via buildroot
There are no release notes for the 5.x series; the git history is at
https://github.com/warmcat/libwebsockets/compare/v4.5.8...v5.1.0Version 5.0.0 added mbedtls 4 support, and 5.1.0 brings the mbedtls 4 fixes on top of it, so libwebsockets now builds and works with mbedtls 4.1.
Drop patch 0001, which was applied upstream in a reworked form as commit
8a0dbfba1("cmake: only use libatomic if it provides the 64-bit atomics").HTTP/3 (QUIC) is now enabled by default. With OpenSSL, it forces the new GnuTLS backend on, and with mbedtls it requires an mbedtls carrying the libwebsockets QUIC patches, so the configure step fails either way:
LWS_ROLE_QUIC(HTTP/3) requires mbedtls to be patched with QUIC support.Disable HTTP/3 and QUIC, which version 4.5.8 did not have either.
LWS_PRE, the headroom required before buffers passed tolws_write(), grew on 64-bit builds, and the soname changed from libwebsockets.so.21 to libwebsockets.so.23.
Quoted 5 lines
The LICENSE file lists two more files that are already MIT licensed (
lib/misc/dhtandlib/misc/qrcodegen.c), hence the hash change.Assisted-by Claude:claude-opus-5-5Signed-off-by Yegor Yefremov <[email protected]>
Applied to master, thanks!
Best regards,
Thomas Petazzoni
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot