projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1dda25
)
windows: _snprintf_s
author
Renyaow
<renyaow@user.github.invalid.com>
Tue, 4 Apr 2017 17:55:38 +0000
(
01:55
+0800)
committer
Andy Green
<andy@warmcat.com>
Tue, 4 Apr 2017 17:55:38 +0000
(
01:55
+0800)
https://github.com/warmcat/libwebsockets/issues/859
lib/libwebsockets.h
patch
|
blob
|
history
diff --git
a/lib/libwebsockets.h
b/lib/libwebsockets.h
index
8be0054
..
ed716e8
100644
(file)
--- a/
lib/libwebsockets.h
+++ b/
lib/libwebsockets.h
@@
-93,6
+93,10
@@
struct sockaddr_in;
#define __func__ __FUNCTION__
#endif
+#if !defined(__MINGW32__) &&(!defined(_MSC_VER) || _MSC_VER < 1900) && !defined(snprintf)
+#define snprintf(buf,len, format,...) _snprintf_s(buf, len,len, format, __VA_ARGS__)
+#endif
+
#else /* NOT WIN32 */
#include <unistd.h>