From f508ae552888d988cc828e70634061867e3a477b Mon Sep 17 00:00:00 2001 From: Joshua Root Date: Tue, 5 Mar 2024 01:28:10 +1100 Subject: [PATCH] Only interpose strndup if it exists Added in the macOS 10.7 SDK. --- src/alloc-override.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/alloc-override.c b/src/alloc-override.c index 7cf0bf2c..b2c94ce2 100644 --- a/src/alloc-override.c +++ b/src/alloc-override.c @@ -77,7 +77,9 @@ typedef struct mi_nothrow_s { int _tag; } mi_nothrow_t; MI_INTERPOSE_MI(calloc), MI_INTERPOSE_MI(realloc), MI_INTERPOSE_MI(strdup), + #if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 MI_INTERPOSE_MI(strndup), + #endif MI_INTERPOSE_MI(realpath), MI_INTERPOSE_MI(posix_memalign), MI_INTERPOSE_MI(reallocf),