diff --git a/Sources/BlocksRuntime/runtime.c b/Sources/BlocksRuntime/runtime.c index 1b7945b949..547d832e50 100644 --- a/Sources/BlocksRuntime/runtime.c +++ b/Sources/BlocksRuntime/runtime.c @@ -15,7 +15,7 @@ #if TARGET_OS_WIN32 #include #include -#else +#elif __has_include() #include #endif #if __has_include() @@ -268,7 +268,11 @@ void _Block_use_RR( void (*retain)(const void *), break; } #else +# if __has_include() _Block_destructInstance = dlsym(RTLD_DEFAULT, "objc_destructInstance"); +# else + _Block_destructInstance = _Block_destructInstance_default; +# endif #endif }