Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libwebsockets: added option to (re-)enable external poll loop support
@ 2023-05-19 14:45 Luca Pesce via buildroot
  2023-05-21 17:08 ` Yann E. MORIN
  2023-05-24  8:31 ` [Buildroot] [PATCH v2 1/2] " Luca Pesce via buildroot
  0 siblings, 2 replies; 10+ messages in thread
From: Luca Pesce via buildroot @ 2023-05-19 14:45 UTC (permalink / raw)
  To: buildroot; +Cc: Luca Pesce

Since version 3.2.0, libwebsockets does not compile its external loop support
code anymore. That code was put under LWS_WITH_EXTERNAL_POLL compile option,
which defaults to OFF.
Applications relying on that support need to turn that option on, so let's
add it to the package.

For example, when libwebsockets in enabled, mosquitto broker is built with
websocket support, but its code requires LWS_WITH_EXTERNAL_POLL to be on -
otherwise, it gives compile-time warning hinting to unusable websocket support:
https://github.com/eclipse/mosquitto/commit/1b24f625ea4ee77f3c4796ec2233d059f8c7977e

Signed-off-by: Luca Pesce <luca.pesce@vimar.com>
---
 package/libwebsockets/Config.in        | 10 ++++++++++
 package/libwebsockets/libwebsockets.mk |  4 ++++
 2 files changed, 14 insertions(+)

diff --git a/package/libwebsockets/Config.in b/package/libwebsockets/Config.in
index d7b529c..1371717 100644
--- a/package/libwebsockets/Config.in
+++ b/package/libwebsockets/Config.in
@@ -9,5 +9,15 @@ config BR2_PACKAGE_LIBWEBSOCKETS
 
 	  https://libwebsockets.org/
 
+if BR2_PACKAGE_LIBWEBSOCKETS
+
+config BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL
+	bool "enable external poll loop support"
+	default n
+	help
+	  Enable external poll loop support code.
+
+endif
+
 comment "libwebsockets needs a toolchain w/ dynamic library"
 	depends on BR2_STATIC_LIBS
diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk
index fb0ee66..86756ca 100644
--- a/package/libwebsockets/libwebsockets.mk
+++ b/package/libwebsockets/libwebsockets.mk
@@ -94,4 +94,8 @@ ifeq ($(BR2_SHARED_LIBS),y)
 LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_STATIC=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL),y)
+LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_EXTERNAL_POLL=ON
+endif
+
 $(eval $(cmake-package))
-- 
2.7.4

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-05-24 20:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-19 14:45 [Buildroot] [PATCH 1/1] package/libwebsockets: added option to (re-)enable external poll loop support Luca Pesce via buildroot
2023-05-21 17:08 ` Yann E. MORIN
2023-05-22  6:34   ` [Buildroot] R: " Pesce Luca via buildroot
2023-05-23 16:27     ` Yann E. MORIN
2023-05-24  6:00       ` [Buildroot] R: " Pesce Luca via buildroot
2023-05-24  6:10         ` Yann E. MORIN
2023-05-24  8:31 ` [Buildroot] [PATCH v2 1/2] " Luca Pesce via buildroot
2023-05-24  8:31   ` [Buildroot] [PATCH v2 2/2] package/mosquitto: when building with libwebsockets support, select its external loop support option Luca Pesce via buildroot
2023-05-24 20:05     ` Yann E. MORIN
2023-05-24 20:04   ` [Buildroot] [PATCH v2 1/2] package/libwebsockets: added option to (re-)enable external poll loop support Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox