From 9dd134c19d5ef12a2663e301cdf3ae339062e742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Sj=C3=B6blom?= Date: Thu, 21 Oct 2021 10:27:37 +0200 Subject: [PATCH] Only use macOS sheet modals when compiler supports blocks Blocks are a non-standard extension and is not supported by GCC. Sheet modals require blocks, so let's fall back on a regular modal when blocks are not supported. --- src/Fl_Native_File_Chooser_MAC.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm index eb09f1c402..9c4b8b8e3b 100644 --- a/src/Fl_Native_File_Chooser_MAC.mm +++ b/src/Fl_Native_File_Chooser_MAC.mm @@ -602,7 +602,7 @@ - (void) option:(BOOL)o fname = [preset lastPathComponent]; } if (_directory && !dir) dir = [[NSString alloc] initWithUTF8String:_directory]; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 && defined(__BLOCKS__) if (fl_mac_os_version >= 100600) { bool usepath = false; NSString *path = nil;