From 5d9f41142b60ce5b91fdc84b35206414fc71b8b8 Mon Sep 17 00:00:00 2001 From: hofman Date: Wed, 13 Mar 2019 22:51:14 +0100 Subject: [PATCH] Define a macro for @available to have a workaround for Xcode 8 --- Sparkle/SUOperatingSystem.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sparkle/SUOperatingSystem.h b/Sparkle/SUOperatingSystem.h index e4334d90..bdb87926 100644 --- a/Sparkle/SUOperatingSystem.h +++ b/Sparkle/SUOperatingSystem.h @@ -22,3 +22,9 @@ typedef struct { + (NSString *)systemVersionString; @end + +#if defined(__clang_major__) && __clang_major__ >= 9 +#define SUAVAILABLE(major, minor) @available(macOS major##.##minor, *) +#else +#define SUAVAILABLE(major, minor) [SUOperatingSystem isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){major, minor, 0}] +#endif