From: dspname Date: Wed, 19 Apr 2017 12:28:48 +0000 (+0800) Subject: windows: constify first arg of plat fops open X-Git-Tag: accepted/tizen/4.0/unified/20171012.191640~129 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca6242a1d302a837b71a6f4d762a5142a6634980;p=platform%2Fupstream%2Flibwebsockets.git windows: constify first arg of plat fops open https://github.com/warmcat/libwebsockets/issues/871 --- diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h index a960113..a291946 100644 --- a/lib/libwebsockets.h +++ b/lib/libwebsockets.h @@ -4423,7 +4423,7 @@ lws_cgi_kill(struct lws *wsi); struct lws_plat_file_ops; -#if defined(WIN32) || defined(_WIN32) +#if (defined(WIN32) || defined(_WIN32)) && !defined(__MINGW32__) /* ... */ #if !defined(ssize_t) typedef SSIZE_T ssize_t; diff --git a/lib/lws-plat-win.c b/lib/lws-plat-win.c index 67c98f4..b8dd4f0 100644 --- a/lib/lws-plat-win.c +++ b/lib/lws-plat-win.c @@ -526,7 +526,7 @@ lws_plat_inet_ntop(int af, const void *src, char *dst, int cnt) } LWS_VISIBLE lws_fop_fd_t -_lws_plat_file_open(struct lws_plat_file_ops *fops, const char *filename, +_lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename, const char *vpath, lws_fop_flags_t *flags) { HANDLE ret; diff --git a/lib/ssl.c b/lib/ssl.c index 11aa14f..0279367 100644 --- a/lib/ssl.c +++ b/lib/ssl.c @@ -21,6 +21,11 @@ #include "private-libwebsockets.h" +/* workaround for mingw */ +#if !defined(ECONNABORTED) +#define ECONNABORTED 103 +#endif + int lws_alloc_vfs_file(struct lws_context *context, const char *filename, uint8_t **buf, lws_filepos_t *amount) {