From d6be6776a85f88bd3bc36cb954dc922257014b81 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sat, 14 May 2016 06:49:29 +0800 Subject: [PATCH] win32 more build fixes After alexgille https://github.com/warmcat/libwebsockets/issues/526 Signed-off-by: Andy Green --- CMakeLists.txt | 2 +- lib/lejp.h | 12 ++++++------ lib/libwebsockets.h | 3 ++- lib/private-libwebsockets.h | 1 + 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d3fa98..4424728 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1186,7 +1186,7 @@ if (NOT LWS_WITHOUT_TESTAPPS) set(PLUGIN_SRCS ${MAIN_SRC}) if (WIN32) - list(APPEND PLUGIN_SRCSset_property + list(APPEND PLUGIN_SRCS ${WIN32_HELPERS_PATH}/getopt.c ${WIN32_HELPERS_PATH}/getopt_long.c ${WIN32_HELPERS_PATH}/gettimeofday.c diff --git a/lib/lejp.h b/lib/lejp.h index f46acb2..ab3052e 100644 --- a/lib/lejp.h +++ b/lib/lejp.h @@ -140,7 +140,7 @@ enum lejp_callbacks { * * LEJPCB_OBJECT_END: An object ended */ -extern char _lejp_callback(struct lejp_ctx *ctx, char reason); +LWS_EXTERN char _lejp_callback(struct lejp_ctx *ctx, char reason); typedef char (*lejp_callback)(struct lejp_ctx *ctx, char reason); @@ -213,20 +213,20 @@ struct lejp_ctx { unsigned char wildcount; }; -LWS_VISIBLE void +LWS_VISIBLE LWS_EXTERN void lejp_construct(struct lejp_ctx *ctx, char (*callback)(struct lejp_ctx *ctx, char reason), void *user, const char * const *paths, unsigned char paths_count); -LWS_VISIBLE void +LWS_VISIBLE LWS_EXTERN void lejp_destruct(struct lejp_ctx *ctx); -LWS_VISIBLE int +LWS_VISIBLE LWS_EXTERN int lejp_parse(struct lejp_ctx *ctx, const unsigned char *json, int len); -LWS_VISIBLE void +LWS_VISIBLE LWS_EXTERN void lejp_change_callback(struct lejp_ctx *ctx, char (*callback)(struct lejp_ctx *ctx, char reason)); -LWS_VISIBLE int +LWS_VISIBLE LWS_EXTERN int lejp_get_wildcard(struct lejp_ctx *ctx, int wildcard, char *dest, int len); diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h index eb0f6f8..bb36468 100644 --- a/lib/libwebsockets.h +++ b/lib/libwebsockets.h @@ -1367,7 +1367,8 @@ struct lws_plugin { * If we add more extensions, publish the callback here ------v */ -extern int lws_extension_callback_pm_deflate( +LWS_EXTERN +int lws_extension_callback_pm_deflate( struct lws_context *context, const struct lws_extension *ext, struct lws *wsi, enum lws_extension_callback_reasons reason, void *user, void *in, size_t len); diff --git a/lib/private-libwebsockets.h b/lib/private-libwebsockets.h index 87dc30b..c6998aa 100644 --- a/lib/private-libwebsockets.h +++ b/lib/private-libwebsockets.h @@ -82,6 +82,7 @@ #include #endif #include +#include #ifndef __func__ #define __func__ __FUNCTION__ -- 2.7.4