From ae1477c08fe136922575ec3145a5c9281c250605 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 22 Jul 2014 10:28:55 +0100 Subject: [PATCH] Windows fixes. --- client/CMakeLists.txt | 4 ++-- client/client_shared.c | 4 ++-- lib/net_mosq.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 97e5dae4..a743fccf 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -11,8 +11,8 @@ endif (${WITH_SRV} STREQUAL ON) add_executable(mosquitto_pub pub_client.c ${shared_src}) add_executable(mosquitto_sub sub_client.c ${shared_src}) -target_link_libraries(mosquitto_pub mosquitto) -target_link_libraries(mosquitto_sub mosquitto) +target_link_libraries(mosquitto_pub libmosquitto) +target_link_libraries(mosquitto_sub libmosquitto) install(TARGETS mosquitto_pub RUNTIME DESTINATION ${BINDIR} LIBRARY DESTINATION ${LIBDIR}) install(TARGETS mosquitto_sub RUNTIME DESTINATION ${BINDIR} LIBRARY DESTINATION ${LIBDIR}) diff --git a/client/client_shared.c b/client/client_shared.c index 85192683..43c86a83 100644 --- a/client/client_shared.c +++ b/client/client_shared.c @@ -54,9 +54,9 @@ int client_config_load(struct mosq_config *cfg, int pub_or_sub, int argc, char * char *loc = NULL; int len; char *args[3]; -#endif args[0] = NULL; +#endif init_config(cfg); @@ -120,7 +120,7 @@ int client_config_load(struct mosq_config *cfg, int pub_or_sub, int argc, char * free(loc); } #else -#warn FIXME - config file support +// FIXME - config file support #endif /* Deal with real argc/argv */ diff --git a/lib/net_mosq.c b/lib/net_mosq.c index 87eeee2d..35449cc6 100644 --- a/lib/net_mosq.c +++ b/lib/net_mosq.c @@ -1016,7 +1016,7 @@ int _mosquitto_socket_nonblock(int sock) return 1; } #else - opt = 1; + unsigned long opt = 1; if(ioctlsocket(sock, FIONBIO, &opt)){ COMPAT_CLOSE(sock); return 1;