Skip to content

Commit

Permalink
Fix cesanta#1359 - add conditional for MSVC, _DEBUG and strdup
Browse files Browse the repository at this point in the history
  • Loading branch information
cpq committed Sep 27, 2021
1 parent c490ff8 commit 46029c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mongoose.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/arch_win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 46029c5

Please sign in to comment.