]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libsanitizer: fix build on darwin
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Fri, 17 Nov 2023 11:46:09 +0000 (12:46 +0100)
committerFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sat, 18 Nov 2023 08:49:27 +0000 (09:49 +0100)
Upstream report of the issue at
https://github.com/llvm/llvm-project/issues/72639

libsanitizer/ChangeLog:

* asan/asan_mac.cpp: Protect Apple blocks behind the
MISSING_BLOCKS_SUPPORT macro.

libsanitizer/asan/asan_mac.cpp

index 5d5146e0cde0ba9b880aacc1410d47bc0058f8c5..6252fa20d5e740f366d071b00c5f27e46370c813 100644 (file)
@@ -139,9 +139,11 @@ typedef void (*dispatch_mach_handler_function_t)(void *context,
                                                  dispatch_mach_reason reason,
                                                  dispatch_mach_msg_t message,
                                                  mach_error_t error);
+#if !defined(MISSING_BLOCKS_SUPPORT)
 typedef void (^dispatch_mach_handler_t)(dispatch_mach_reason reason,
                                         dispatch_mach_msg_t message,
                                         mach_error_t error);
+#endif
 
 // A wrapper for the ObjC blocks used to support libdispatch.
 typedef struct {