SDL_mfijoystick.m: fix build with Xcode < 9

Fixes #6601.
This commit is contained in:
Joshua Root 2022-11-24 07:37:36 +11:00 committed by Sam Lantinga
parent f8cebeea59
commit 53ca1f7702

View file

@ -639,11 +639,16 @@ static int
IOS_JoystickInit(void) IOS_JoystickInit(void)
{ {
#if defined(__MACOSX__) #if defined(__MACOSX__)
#if _SDL_HAS_BUILTIN(__builtin_available)
if (@available(macOS 10.16, *)) { if (@available(macOS 10.16, *)) {
/* Continue with initialization on macOS 11+ */ /* Continue with initialization on macOS 11+ */
} else { } else {
return 0; return 0;
} }
#else
/* No @available, must be an older macOS version */
return 0;
#endif
#endif #endif
@autoreleasepool { @autoreleasepool {