* [Buildroot] [PATCH] package/libwebsockets: bump to version 5.1.0
@ 2026-11-02 15:06 Yegor Yefremov via buildroot
2026-11-04 21:52 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Yegor Yefremov via buildroot @ 2026-11-02 15:06 UTC (permalink / raw)
To: buildroot; +Cc: Danomi Manchego
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.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
...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
diff --git a/package/libwebsockets/0001-cmake-openssl-only-link-libatomic-if-it-is-available.patch b/package/libwebsockets/0001-cmake-openssl-only-link-libatomic-if-it-is-available.patch
deleted file mode 100644
index 84724f9c50..0000000000
--- a/package/libwebsockets/0001-cmake-openssl-only-link-libatomic-if-it-is-available.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From e0480a47e95a0d74c826926ae6bfef14fc8d988f Mon Sep 17 00:00:00 2001
-From: Yegor Yefremov <yegorslists@googlemail.com>
-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 <andy@warmcat.com> on 2026-10-27
-Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
----
- 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
-
diff --git a/package/libwebsockets/libwebsockets.hash b/package/libwebsockets/libwebsockets.hash
index 654d3007e6..fe5c7b06ce 100644
--- a/package/libwebsockets/libwebsockets.hash
+++ b/package/libwebsockets/libwebsockets.hash
@@ -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
diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk
index 51f3df80f1..513b09ded2 100644
--- a/package/libwebsockets/libwebsockets.mk
+++ b/package/libwebsockets/libwebsockets.mk
@@ -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 \
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] package/libwebsockets: bump to version 5.1.0
2026-11-02 15:06 [Buildroot] [PATCH] package/libwebsockets: bump to version 5.1.0 Yegor Yefremov via buildroot
@ 2026-11-04 21:52 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-11-04 21:52 UTC (permalink / raw)
To: Yegor Yefremov; +Cc: buildroot, Danomi Manchego
On Mon, Nov 02, 2026 at 04:06:40PM +0100, Yegor Yefremov via buildroot wrote:
> 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.
>
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Applied to master, thanks!
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-04 21:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02 15:06 [Buildroot] [PATCH] package/libwebsockets: bump to version 5.1.0 Yegor Yefremov via buildroot
2026-11-04 21:52 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox