--- src/plugins/tts/darwin/qtexttospeech_darwin.mm.orig	2023-03-12 05:16:00.000000000 +0100
+++ src/plugins/tts/darwin/qtexttospeech_darwin.mm	2023-07-09 02:30:51.000000000 +0200
@@ -2,6 +2,7 @@
 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only
 
 #include <AVFoundation/AVFoundation.h>
+#include <../../System/Library/Frameworks/AVFoundation.framework/Frameworks/AVFAudio.framework/Headers/AVSpeechSynthesis.h>  // 10.14 SDK fix
 
 #include "qtexttospeech_darwin.h"
 
@@ -281,6 +282,7 @@
 {
     // only from macOS 10.15 and iOS 13 on
     const QVoice::Gender gender = [avVoice]{
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
         if (@available(macos 10.15, ios 13, *)) {
             switch (avVoice.gender) {
             case AVSpeechSynthesisVoiceGenderMale:
@@ -291,6 +293,7 @@
                 break;
             };
         }
+#endif
         return QVoice::Unknown;
     }();
 
