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

Conditionally define snprintf on Windows

snprintf is already defined in MSVC 2015. If you redefine it <stdio.h> will cry about it and abort the compilation.
This commit is contained in:
Lucas Terra 2016-04-18 16:15:37 -03:00
parent c673125ce0
commit 3357fd9b98

View file

@ -146,7 +146,9 @@ struct sockaddr_in;
#define LWS_INVALID_FILE INVALID_HANDLE_VALUE
#define LWS_O_RDONLY _O_RDONLY
#if !defined(_MSC_VER) || _MSC_VER < 1900 /* Visual Studio 2015 already defines this in <stdio.h> */
#define snprintf _snprintf
#endif
#else /* NOT WIN32 */
#include <unistd.h>