Skip to content

Commit

Permalink
Give compile time warning for libwebsockets
Browse files Browse the repository at this point in the history
If it is compiled without external poll support.

Closes #2060. Thanks to Yannic Schröder.
  • Loading branch information
ralight committed Feb 9, 2021
1 parent 7fe6387 commit 1b24f62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.txt
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/mosquitto_broker_internal.h
Expand Up @@ -25,6 +25,9 @@ SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause

#ifdef WITH_WEBSOCKETS
# include <libwebsockets.h>
# 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"
Expand Down

0 comments on commit 1b24f62

Please sign in to comment.