[compiler-rt] d705bd2 - [compiler-rt] freadlink fix 2 for #83679. (#110372)

via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 28 22:36:41 PDT 2024


Author: David CARLIER
Date: 2024-09-29T06:36:38+01:00
New Revision: d705bd25eb9f11e100d3e79b65a80d446fd06f30

URL: https://github.com/llvm/llvm-project/commit/d705bd25eb9f11e100d3e79b65a80d446fd06f30
DIFF: https://github.com/llvm/llvm-project/commit/d705bd25eb9f11e100d3e79b65a80d446fd06f30.diff

LOG: [compiler-rt] freadlink fix 2 for #83679. (#110372)

using __MAC_OS_X_VERSION_MIN_REQUIRED instead.

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
index d4cc380f641b82..601bfc502ec083 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -606,13 +606,13 @@
 // FIXME: also available from musl 1.2.5
 #define SANITIZER_INTERCEPT_PREADV2 (SI_LINUX && __GLIBC_PREREQ(2, 26))
 #define SANITIZER_INTERCEPT_PWRITEV2 (SI_LINUX && __GLIBC_PREREQ(2, 26))
-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \
-    __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 130000
-#  define SI_MAC_DEPLOYMENT_BELOW_13_00 1
+#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \
+    __MAC_OS_X_VERSION_MIN_REQUIRED >= 130000
+#  define SI_MAC_OS_DEPLOYMENT_MIN_13_00 1
 #else
-#  define SI_MAC_DEPLOYMENT_BELOW_13_00 0
+#  define SI_MAC_OS_DEPLOYMENT_MIN_13_00 0
 #endif
-#define SANITIZER_INTERCEPT_FREADLINK (SI_MAC && !SI_MAC_DEPLOYMENT_BELOW_13_00)
+#define SANITIZER_INTERCEPT_FREADLINK (SI_MAC && SI_MAC_OS_DEPLOYMENT_MIN_13_00)
 
 // This macro gives a way for downstream users to override the above
 // interceptor macros irrespective of the platform they are on. They have


        


More information about the llvm-commits mailing list