package/libwebsockets: fix build with libev and libevent
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sun, 6 Oct 2019 12:53:38 +0000 (14:53 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 7 Oct 2019 20:46:50 +0000 (22:46 +0200)
libev and libevent can't be enabled at the same time since version 3.0.0
and
https://github.com/warmcat/libwebsockets/commit/ff2f5f601d5965f5860bc989d05b61246f172095

So prefer libev over libevent to have the same default behavior than
upstream LWS_WITH_DISTRO_RECOMMENDED target

Fixes:
 - http://autobuild.buildroot.org/results/ee5ef79a39570bcf5c605b1a4b6b48523605d647

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libwebsockets/libwebsockets.mk

index 0b488d1f05b1d6ede211f756f96468a410af20b6..7a065dfb2263be534a5e466ba0bab33094c72354 100644 (file)
@@ -30,16 +30,18 @@ endif
 
 ifeq ($(BR2_PACKAGE_LIBEV),y)
 LIBWEBSOCKETS_DEPENDENCIES += libev
-LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEV=ON
-else
-LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEV=OFF
-endif
-
-ifeq ($(BR2_PACKAGE_LIBEVENT),y)
+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_LIBEVENT=ON
+LIBWEBSOCKETS_CONF_OPTS += \
+       -DLWS_WITH_LIBEV=OFF \
+       -DLWS_WITH_LIBEVENT=ON
 else
-LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEVENT=OFF
+LIBWEBSOCKETS_CONF_OPTS += \
+       -DLWS_WITH_LIBEV=OFF \
+       -DLWS_WITH_LIBEVENT=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_LIBUV),y)