Skip to content

Commit

Permalink
ITunesFeature: Comment on __builtin_available
Browse files Browse the repository at this point in the history
fwcd committed Mar 30, 2023
1 parent 6e80d16 commit f4ab748
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/library/itunes/itunesfeature.cpp
Original file line number Diff line number Diff line change
@@ -37,6 +37,10 @@ const QString ITDB_PATH_KEY = "mixxx.itunesfeature.itdbpath";
bool isMacOSImporterAvailable() {
#ifdef __MACOS_ITUNES_LIBRARY__
// The iTunesLibrary framework is only available on macOS 10.13+
// Note that this uses a Clang directive to check the macOS version at
// runtime, which is the suggested approach for conditionally accessing
// macOS frameworks from C++ depending on availability:
// https://stackoverflow.com/a/57825758
if (__builtin_available(macOS 10.13, *)) {
return true;
}

0 comments on commit f4ab748

Please sign in to comment.