From 8a7a0a5409f8fe8be05ce197f94715f86590813a Mon Sep 17 00:00:00 2001 From: Maksim Smolin Date: Tue, 22 Jan 2019 16:58:39 -0800 Subject: [PATCH 1/2] fix malloc.h missing from memdbgon.h on mac debug builds --- public/tier0/memdbgon.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/tier0/memdbgon.h b/public/tier0/memdbgon.h index fff3f470..73bd9272 100644 --- a/public/tier0/memdbgon.h +++ b/public/tier0/memdbgon.h @@ -33,7 +33,11 @@ #include #endif #include +#if defined __APPLE__ +#include +#else #include +#endif #include "commonmacros.h" #include "memalloc.h" From 2d52e7127e448b84d32a129d1a8b9549bd2d43c4 Mon Sep 17 00:00:00 2001 From: Maksim Smolin Date: Tue, 22 Jan 2019 16:59:27 -0800 Subject: [PATCH 2/2] fix utlstring trying to override memdbg on Mac debug builds --- public/tier1/utlstring.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/tier1/utlstring.h b/public/tier1/utlstring.h index a57d069c..0542de17 100644 --- a/public/tier1/utlstring.h +++ b/public/tier1/utlstring.h @@ -16,6 +16,8 @@ #include "limits.h" #if defined( OSX ) + +#if !defined( wcsdup ) inline wchar_t *wcsdup(const wchar_t *pString) { wchar_t *pMemory; @@ -31,6 +33,7 @@ inline wchar_t *wcsdup(const wchar_t *pString) return NULL; } +#endif inline size_t strnlen(const char *s, size_t n) {