From 1b24f625ea4ee77f3c4796ec2233d059f8c7977e Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Wed, 3 Feb 2021 20:16:06 +0000 Subject: [PATCH] Give compile time warning for libwebsockets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If it is compiled without external poll support. Closes #2060. Thanks to Yannic Schröder. --- ChangeLog.txt | 2 ++ src/mosquitto_broker_internal.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index db224ae5..214974b0 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -5,6 +5,8 @@ Broker: because plugins should never be allocating their own instance of this struct, and currently none of the struct members are used for anything, so a plugin should not be accessing them. +- Give compile time warning if libwebsockets compiled without external poll + support. Closes #2060. Clients: - Fix possible loss of data in `mosquitto_pub -l` when sending multiple long diff --git a/src/mosquitto_broker_internal.h b/src/mosquitto_broker_internal.h index 5b88710f..894e7500 100644 --- a/src/mosquitto_broker_internal.h +++ b/src/mosquitto_broker_internal.h @@ -25,6 +25,9 @@ Contributors: #ifdef WITH_WEBSOCKETS # include +# if LWS_LIBRARY_VERSION_NUMBER >= 3002000 && !defined(LWS_WITH_EXTERNAL_POLL) +# warning "libwebsockets is not compiled with LWS_WITH_EXTERNAL_POLL support. Websocket performance will be unusable." +# endif #endif #include "mosquitto_internal.h"