package/libwebsockets: (re-)enable external poll loop support

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 is 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:

1b24f625ea

Signed-off-by: Luca Pesce <luca.pesce@vimar.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
master
Luca Pesce 2023-05-24 10:31:56 +02:00 committed by Yann E. MORIN
parent a6599bc753
commit 7685016cdc
2 changed files with 16 additions and 0 deletions

View File

@ -9,5 +9,17 @@ config BR2_PACKAGE_LIBWEBSOCKETS
https://libwebsockets.org/
if BR2_PACKAGE_LIBWEBSOCKETS
config BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL
bool "enable external poll loop support"
default y # legacy, was previously always enabled
help
Enable external poll loop support code. This was
unconditionally compiled in for library versions
prior to 3.2.0.
endif
comment "libwebsockets needs a toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS

View File

@ -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))