From ef36d6cdc5d932a28baf2cb406bd20ca65b97dbc Mon Sep 17 00:00:00 2001 From: Jan Date: Fri, 19 Mar 2021 16:41:18 +0100 Subject: [PATCH] Use _strdup instead of strdup when using msvc --- src/Utils/Utils/MemoryManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Utils/Utils/MemoryManager.cpp b/src/Utils/Utils/MemoryManager.cpp index 1a79ad40..759d28b3 100644 --- a/src/Utils/Utils/MemoryManager.cpp +++ b/src/Utils/Utils/MemoryManager.cpp @@ -37,7 +37,11 @@ void* MemoryManager::Alloc(const size_t size) char* MemoryManager::Dup(const char* str) { - char* result = strdup(str); +#ifdef _MSC_VER + auto* result = _strdup(str); +#else + auto* result = strdup(str); +#endif m_allocations.push_back(result); return result;