diff --git a/client/sub_client_output.c b/client/sub_client_output.c index 38061967..167071f8 100644 --- a/client/sub_client_output.c +++ b/client/sub_client_output.c @@ -331,7 +331,7 @@ static int json_print(const struct mosquitto_message *message, const mosquitto_p return_parse_end = NULL; if(message->payload){ tmp = cJSON_ParseWithOpts(message->payload, &return_parse_end, true); - if(tmp == NULL || return_parse_end != (uint8_t *)message->payload + message->payloadlen){ + if(tmp == NULL || return_parse_end != (char *)message->payload + message->payloadlen){ cJSON_Delete(root); return MOSQ_ERR_INVAL; } diff --git a/include/mosquitto_broker.h b/include/mosquitto_broker.h index f1c82498..6f23a71c 100644 --- a/include/mosquitto_broker.h +++ b/include/mosquitto_broker.h @@ -30,6 +30,7 @@ extern "C" { #endif #include +#include #include struct mosquitto; diff --git a/include/mosquitto_plugin.h b/include/mosquitto_plugin.h index d4c69a96..360b889c 100644 --- a/include/mosquitto_plugin.h +++ b/include/mosquitto_plugin.h @@ -60,6 +60,8 @@ struct mosquitto_acl_msg { #ifdef WIN32 # define mosq_plugin_EXPORT __declspec(dllexport) +#else +# define mosq_plugin_EXPORT #endif /*