From 29660016a25a8374cbe4b423a9660edd22b9648f Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Mon, 17 Feb 2025 11:10:15 +0800 Subject: [PATCH] utilsunx: no memset_s before 10.9 --- src/unix/utilsunx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index 8a944cd626..7d384705d1 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -150,6 +150,7 @@ #if defined(__DARWIN__) #include + #include #endif // ---------------------------------------------------------------------------- @@ -225,7 +226,7 @@ void wxSecureZeroMemory(void* v, size_t n) // but may be found in a non-standard header file, or in a library that is // not linked by default. explicit_bzero(v, n); -#elif defined(__DARWIN__) || defined(__STDC_LIB_EXT1__) +#elif (defined(__DARWIN__) && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1090)) || defined(__STDC_LIB_EXT1__) // memset_s() is available since OS X 10.9, and may be available on // other platforms. memset_s(v, n, 0, n);