From 63cc8e5523f0b40cfdb20b6a52d6b46f4ad246bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 5 Feb 2025 14:40:49 +0800 Subject: [PATCH] Camera (macOS): make fastfetch compiled on newer macOS versions runs on older ones --- src/detection/camera/camera_apple.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/detection/camera/camera_apple.m b/src/detection/camera/camera_apple.m index ab15fb99e..45da1246f 100644 --- a/src/detection/camera/camera_apple.m +++ b/src/detection/camera/camera_apple.m @@ -6,6 +6,11 @@ // warning: 'AVCaptureDeviceTypeExternalUnknown' is deprecated #pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#ifdef MAC_OS_VERSION_14_0 +// To make fastfetch compiled on newer macOS versions runs on older ones +AVF_EXPORT __attribute__((weak_import)) AVCaptureDeviceType const AVCaptureDeviceTypeExternal; +#endif + const char* ffDetectCamera(FFlist* result) { #ifdef MAC_OS_X_VERSION_10_15