mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-08-17 17:41:58 +08:00
Windows: Build fixes
This commit is contained in:
committed by
Roger Light
parent
db8db8d1dd
commit
e27ee2b4f5
+1
-1
@@ -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
@@ -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,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,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(). */
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <mosquitto.h>
|
||||
#ifdef WIN32
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
static int run = -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user