Skip to content

Commit

Permalink
[FIXED] Build issue with Microsoft Visual Studio 2015
Browse files Browse the repository at this point in the history
Should not define snprintf as _snprintf starting Visual Studio 2015.

Thanks to @dbskccc

Resolves #45
  • Loading branch information
kozlovic committed Nov 19, 2016
1 parent e197c46 commit e5531cf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/include/n-win.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ typedef int natsRecvLen;
#define NATS_SOCK_GET_ERROR WSAGetLastError()

// Windows doesn't have those..
#define snprintf _snprintf
// snprintf support is introduced starting MSVC 14.0 (_MSC_VER 1900: Visual Studio 2015)
#if _MSC_VER < 1900
#define snprintf _snprintf
#endif
#define strcasecmp _stricmp

int
Expand Down

0 comments on commit e5531cf

Please sign in to comment.