diff --git a/src/corelib/kernel/qcore_mac.mm b/src/corelib/kernel/qcore_mac.mm index c4abdd271e..067c1a9ec7 100644 --- a/src/corelib/kernel/qcore_mac.mm +++ b/src/corelib/kernel/qcore_mac.mm @@ -35,11 +35,13 @@ extern "C" { typedef uint32_t csr_config_t; extern int csr_get_active_config(csr_config_t *) __attribute__((weak_import)); +#ifdef QT_BUILD_INTERNAL int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim) __attribute__((availability(macos,introduced=10.14),weak_import)); pid_t responsibility_get_pid_responsible_for_pid(pid_t) __attribute__((weak_import)); char *** _NSGetArgv(); extern char **environ; +#endif } #endif @@ -384,6 +386,7 @@ std::optional qt_mac_sipConfiguration() return; \ } +#ifdef QT_BUILD_INTERNAL void qt_mac_ensureResponsible() { #if !defined(QT_APPLE_NO_PRIVATE_APIS) @@ -421,6 +424,7 @@ void qt_mac_ensureResponsible() posix_spawnattr_destroy(&attr); #endif } +#endif // QT_BUILD_INTERNAL #endif diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h index f9e7dbcdce..aee5fcb604 100644 --- a/src/corelib/kernel/qcore_mac_p.h +++ b/src/corelib/kernel/qcore_mac_p.h @@ -184,7 +184,9 @@ private: Q_CORE_EXPORT bool qt_mac_applicationIsInDarkMode(); Q_CORE_EXPORT bool qt_mac_runningUnderRosetta(); Q_CORE_EXPORT std::optional qt_mac_sipConfiguration(); -Q_CORE_EXPORT void qt_mac_ensureResponsible(); +#ifdef QT_BUILD_INTERNAL +Q_AUTOTEST_EXPORT void qt_mac_ensureResponsible(); +#endif #endif #ifndef QT_NO_DEBUG_STREAM