1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

windows: _snprintf_s

https://github.com/warmcat/libwebsockets/issues/859
This commit is contained in:
Renyaow 2017-04-05 01:55:38 +08:00 committed by Andy Green
parent d1dda25c6d
commit 4ae029c3a1

View file

@ -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>