From 4df3bee178b1e01bdedea2d8e94f38396447304e Mon Sep 17 00:00:00 2001 From: kojin Date: Sun, 3 Oct 2021 16:17:42 -0400 Subject: [PATCH] common: don't use NULL in SafeSysMunmap BSD maps NULL to nullptr_t which is a problem because it's not a ptr type --- common/General.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/General.h b/common/General.h index 16edec2bec..3329c0e320 100644 --- a/common/General.h +++ b/common/General.h @@ -211,7 +211,7 @@ namespace HostSys // Safe version of Munmap -- NULLs the pointer variable immediately after free'ing it. #define SafeSysMunmap(ptr, size) \ - ((void)(HostSys::Munmap((uptr)(ptr), size), (ptr) = NULL)) + ((void)(HostSys::Munmap((uptr)(ptr), size), (ptr) = 0)) extern void InitCPUTicks(); extern u64 GetTickFrequency();