From cfc06584cc358b487e1cfeec636f12f081881103 Mon Sep 17 00:00:00 2001
From: Peter Olsson <peter@olssononline.se>
Date: Tue, 14 Jan 2014 09:47:36 +0100
Subject: [PATCH] Silence warnings: Use _strdup instead of strdup on Windows
 Release build

---
 src/include/switch_utils.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/include/switch_utils.h b/src/include/switch_utils.h
index 971a915bad..54e0d369ad 100644
--- a/src/include/switch_utils.h
+++ b/src/include/switch_utils.h
@@ -1019,7 +1019,11 @@ SWITCH_DECLARE(int) switch_split_user_domain(char *in, char **user, char **domai
 #ifdef NDEBUG
 #define switch_malloc(ptr, len) (void)( (!!(ptr = malloc(len))) || (fprintf(stderr,"ABORT! Malloc failure at: %s:%d", __FILE__, __LINE__),abort(), 0), ptr )
 #define switch_zmalloc(ptr, len) (void)( (!!(ptr = calloc(1, (len)))) || (fprintf(stderr,"ABORT! Malloc failure at: %s:%d", __FILE__, __LINE__),abort(), 0), ptr)
+#if (_MSC_VER >= 1500)			// VC9+
+#define switch_strdup(ptr, s) (void)( (!!(ptr = _strdup(s))) || (fprintf(stderr,"ABORT! Malloc failure at: %s:%d", __FILE__, __LINE__),abort(), 0), ptr)
+#else
 #define switch_strdup(ptr, s) (void)( (!!(ptr = strdup(s))) || (fprintf(stderr,"ABORT! Malloc failure at: %s:%d", __FILE__, __LINE__),abort(), 0), ptr)
+#endif
 #else
 #if (_MSC_VER >= 1500)			// VC9+
 #define switch_malloc(ptr, len) (void)(assert(((ptr) = malloc((len)))),ptr);__analysis_assume( ptr )