From d864c8127f9c9ae6edfadf5ed3b00f110b056877 Mon Sep 17 00:00:00 2001 From: Cristian Magherusan-Stanciu Date: Wed, 4 Nov 2026 16:58:18 +0100 Subject: [PATCH] fix(DisplayLink): declare CACurrentMediaTime instead of importing QuartzCore DisplayLink.c only needs CACurrentMediaTime. Importing the QuartzCore umbrella pulls Objective-C layer declarations into this C translation unit, which does not compile on SDKs whose umbrella is Objective-C only. Declare the one function the file uses. (cherry picked from commit 2cf8efaa61f2f562a1bb07f8eb4a92a831861321) --- Sources/COpenSwiftUI/Overlay/CoreVideo/DisplayLink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/COpenSwiftUI/Overlay/CoreVideo/DisplayLink.c b/Sources/COpenSwiftUI/Overlay/CoreVideo/DisplayLink.c index 9474e281f..6e18651b0 100644 --- a/Sources/COpenSwiftUI/Overlay/CoreVideo/DisplayLink.c +++ b/Sources/COpenSwiftUI/Overlay/CoreVideo/DisplayLink.c @@ -10,9 +10,11 @@ #if OPENSWIFTUI_TARGET_OS_OSX #include -#include #include +// The C source only needs this QuartzCore function. Importing the framework +// umbrella also pulls Objective-C layer declarations into this translation unit. +extern CFTimeInterval CACurrentMediaTime(void); extern void CVDisplayLinkSetPaused(CVDisplayLinkRef displayLink, bool paused); static void remove_link(DisplayLinkRef displayLink);