Windows: Build fixes

This commit is contained in:
Roger A. Light
2026-05-03 01:17:26 +01:00
committed by Roger Light
parent db8db8d1dd
commit e27ee2b4f5
5 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -367,7 +367,7 @@ static int log__vprintf(unsigned int priority, const char *fmt, va_list va)
syslog(syslog_priority, "%s", log_line);
#else
sp = (char *)log_line;
ReportEvent(syslog_h, syslog_priority, 0, 0, NULL, 1, 0, &sp, NULL);
ReportEvent(syslog_h, syslog_priority, 0, 0, NULL, 1, 0, (const char **)&sp, NULL);
#endif
}
if(log_destinations & MQTT3_LOG_TOPIC && priority != MOSQ_LOG_DEBUG && priority != MOSQ_LOG_INTERNAL){
+1 -1
View File
@@ -217,7 +217,7 @@ int mux_poll__handle(struct mosquitto__listener_sock *listensock, int listensock
db.now_real_s = time(NULL);
if(fdcount == -1){
# ifdef WIN32
# if defined(WIN32) && defined(WITH_WEBSOCKETS) && WITH_WEBSOCKETS == WS_IS_LWS
if(WSAGetLastError() == WSAEINVAL){
/* WSAPoll() immediately returns an error if it is not given
* any sockets to wait on. This can happen if we only have
+3
View File
@@ -3,6 +3,9 @@
#include <stdlib.h>
#include <time.h>
#include <mosquitto.h>
#ifdef WIN32
# include <windows.h>
#endif
/* mosquitto_connect_async() test, with mosquitto_loop_start() called before mosquitto_connect_async(). */
+3
View File
@@ -3,6 +3,9 @@
#include <stdlib.h>
#include <time.h>
#include <mosquitto.h>
#ifdef WIN32
# include <windows.h>
#endif
/* mosquitto_connect_async() test, with mosquitto_loop_start() called after mosquitto_connect_async(). */
+3
View File
@@ -4,6 +4,9 @@
#include <string.h>
#include <time.h>
#include <mosquitto.h>
#ifdef WIN32
# include <windows.h>
#endif
static int run = -1;