diff --git a/CoreFoundation/Base.subproj/CFPlatform.c b/CoreFoundation/Base.subproj/CFPlatform.c index bf332973eb..033f438436 100644 --- a/CoreFoundation/Base.subproj/CFPlatform.c +++ b/CoreFoundation/Base.subproj/CFPlatform.c @@ -1711,7 +1711,7 @@ int _CFOpenFile(const char *path, int opts) { } CF_CROSS_PLATFORM_EXPORT void *_CFReallocf(void *ptr, size_t size) { -#if TARGET_OS_WIN32 || TARGET_OS_LINUX || defined(__OpenBSD__) +#if TARGET_OS_WIN32 || TARGET_OS_LINUX || TARGET_OS_WASI || defined(__OpenBSD__) void *mem = realloc(ptr, size); if (mem == NULL && ptr != NULL && size != 0) { free(ptr);