diff --git a/ChangeLog.txt b/ChangeLog.txt index 60eca9e3..cd88f8d4 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -21,6 +21,8 @@ Broker: - mosquitto_passwd utility now correctly deals with unknown command line arguments in all cases. Closes #169. - Fix publishing of $SYS/broker/clients/maximum +- Fix order of #includes in lib/send_mosq.c to ensure struct mosquitto doesn't + differ between source files when websockets is being used. Closes #180. Client library: - Fix the case where a message received just before the keepalive timer diff --git a/lib/send_mosq.c b/lib/send_mosq.c index 8b5b918e..a4aae723 100644 --- a/lib/send_mosq.c +++ b/lib/send_mosq.c @@ -18,6 +18,13 @@ Contributors: #include #include +#ifdef WITH_BROKER +#include +# ifdef WITH_SYS_TREE +extern uint64_t g_pub_bytes_sent; +# endif +#endif + #include #include #include @@ -28,13 +35,6 @@ Contributors: #include #include -#ifdef WITH_BROKER -#include -# ifdef WITH_SYS_TREE -extern uint64_t g_pub_bytes_sent; -# endif -#endif - int _mosquitto_send_pingreq(struct mosquitto *mosq) { int rc;