From 6a8e1e220fb283d57f07d68e96312a5215afd517 Mon Sep 17 00:00:00 2001 From: Luca Pesce Date: Fri, 10 Mar 2023 14:48:31 +0100 Subject: [PATCH] package/libwebsockets: enable libev and libevent support indipendently libev and libevent can be enabled at the same time since version 4.1.0, thanks to the event lib support refactoring into plugins, which is enabled by default for unix platform builds (LWS_WITH_EVLIB_PLUGINS=ON): https://github.com/warmcat/libwebsockets/commit/c6c7ab2b4498c62bf9461b36395d8466e023575d In this way, libwebsockets can be compiled with both libev and libevent support, which is then user-selectable at runtime. This basically restores the behavior changed by previous commit 27f257e. Signed-off-by: Luca Pesce Signed-off-by: Thomas Petazzoni --- package/libwebsockets/libwebsockets.mk | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk index 79624948a5..fb0ee66883 100644 --- a/package/libwebsockets/libwebsockets.mk +++ b/package/libwebsockets/libwebsockets.mk @@ -57,18 +57,16 @@ endif ifeq ($(BR2_PACKAGE_LIBEV),y) LIBWEBSOCKETS_DEPENDENCIES += libev -LIBWEBSOCKETS_CONF_OPTS += \ - -DLWS_WITH_LIBEV=ON \ - -DLWS_WITH_LIBEVENT=OFF -else ifeq ($(BR2_PACKAGE_LIBEVENT),y) -LIBWEBSOCKETS_DEPENDENCIES += libevent -LIBWEBSOCKETS_CONF_OPTS += \ - -DLWS_WITH_LIBEV=OFF \ - -DLWS_WITH_LIBEVENT=ON +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEV=ON else -LIBWEBSOCKETS_CONF_OPTS += \ - -DLWS_WITH_LIBEV=OFF \ - -DLWS_WITH_LIBEVENT=OFF +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEV=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBEVENT),y) +LIBWEBSOCKETS_DEPENDENCIES += libevent +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEVENT=ON +else +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEVENT=OFF endif ifeq ($(BR2_PACKAGE_LIBGLIB2),y)