Fix #1359 - add conditional for MSVC, _DEBUG and strdup

This commit is contained in:
Sergey Lyubka committed 2021-09-27 13:52:39 +01:00
1 parent c490ff8ae7
commit 46029c501a
2 files changed
+4

No files matched your search

+2
View File
@@ -418,8 +418,10 @@ typedef enum { false = 0, true = 1 } bool;
#ifndef __cplusplus
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#ifndef strdup // For MSVC with _DEBUG, see #1359
#define strdup(x) _strdup(x)
#endif
#endif
typedef unsigned suseconds_t;
typedef int socklen_t;
+2
View File
@@ -51,8 +51,10 @@ typedef enum { false = 0, true = 1 } bool;
#ifndef __cplusplus
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#ifndef strdup // For MSVC with _DEBUG, see #1359
#define strdup(x) _strdup(x)
#endif
#endif
typedef unsigned suseconds_t;
typedef int socklen_t;