Skip to content

Commit

Permalink
Windows build fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Mar 5, 2019
1 parent 105ad17 commit cd07c2b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ set(C_SRC
options.c
packet_datatypes.c
packet_mosq.c packet_mosq.h
property_mosq.c property_mosq.h
read_handle.c read_handle.h
send_connect.c
send_disconnect.c
Expand Down
4 changes: 2 additions & 2 deletions lib/mosquitto.h
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ libmosq_EXPORT int mosquitto_subscribe_v5(struct mosquitto *mosq, int *mid, cons
* MOSQ_ERR_OVERSIZE_PACKET - if the resulting packet would be larger than
* supported by the broker.
*/
int mosquitto_subscribe_multiple(struct mosquitto *mosq, int *mid, int sub_count, char *const *const sub, int qos, int options, const mosquitto_property *properties);
libmosq_EXPORT int mosquitto_subscribe_multiple(struct mosquitto *mosq, int *mid, int sub_count, char *const *const sub, int qos, int options, const mosquitto_property *properties);

/*
* Function: mosquitto_unsubscribe
Expand Down Expand Up @@ -1035,7 +1035,7 @@ libmosq_EXPORT int mosquitto_unsubscribe_v5(struct mosquitto *mosq, int *mid, co
* MOSQ_ERR_OVERSIZE_PACKET - if the resulting packet would be larger than
* supported by the broker.
*/
int mosquitto_unsubscribe_multiple(struct mosquitto *mosq, int *mid, int sub_count, char *const *const sub, const mosquitto_property *properties);
libmosq_EXPORT int mosquitto_unsubscribe_multiple(struct mosquitto *mosq, int *mid, int sub_count, char *const *const sub, const mosquitto_property *properties);


/* ======================================================================
Expand Down
3 changes: 3 additions & 0 deletions lib/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ and the Eclipse Distribution License is available at
#include <string.h>

#ifdef WITH_TLS
# ifdef WIN32
# include <winsock2.h>
# endif
# include <openssl/engine.h>
#endif

Expand Down
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/src
${STDBOOL_H_PATH} ${STDINT_H_PATH})

set (MOSQ_SRCS
../lib/alias_mosq.c ../lib/alias_mosq.h
conf.c
conf_includedir.c
context.c
Expand Down Expand Up @@ -53,6 +54,7 @@ set (MOSQ_SRCS
../lib/util_mosq.c ../lib/util_topic.c ../lib/util_mosq.h
../lib/utf8_mosq.c
websockets.c
will_delay.c
../lib/will_mosq.c ../lib/will_mosq.h)


Expand Down
5 changes: 4 additions & 1 deletion src/websockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ POSSIBILITY OF SUCH DAMAGE.

#include <stdlib.h>
#include <errno.h>
#include <sys/socket.h>
#include <sys/stat.h>

#ifndef WIN32
# include <sys/socket.h>
#endif

extern struct mosquitto_db int_db;

#if defined(LWS_LIBRARY_VERSION_NUMBER)
Expand Down

0 comments on commit cd07c2b

Please sign in to comment.