diff --git a/mongoose.h b/mongoose.h index 0ae3de3b..53821660 100644 --- a/mongoose.h +++ b/mongoose.h @@ -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; diff --git a/src/arch_win32.h b/src/arch_win32.h index a14343f0..a9183227 100644 --- a/src/arch_win32.h +++ b/src/arch_win32.h @@ -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;