From 5a4d0959b30c8bdc035024496c7a73aa6b2203df Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Fri, 5 Aug 2022 16:49:02 +0100 Subject: [PATCH] Update objc/runtime.h Co-authored-by: Frederik Seiffert --- objc/runtime.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objc/runtime.h b/objc/runtime.h index ba479d3..7a816ec 100644 --- a/objc/runtime.h +++ b/objc/runtime.h @@ -26,7 +26,7 @@ extern "C" { # endif #endif -#if __has_attribute(ns_returns_retained) +#if defined(__OBJC__) && __has_attribute(ns_returns_retained) # define OBJC_RETURNS_RETAINED __attribute__((ns_returns_retained)) #else # define OBJC_RETURNS_RETAINED