From ad8b88ecd70c1bd1b3fabe4161032be71815a2ce Mon Sep 17 00:00:00 2001 From: naaiyy Date: Tue, 17 Feb 2026 22:22:39 +0100 Subject: [PATCH] fix: Add #[cfg(target_os = "macos")] to cleanup_native_control The cleanup_native_control function uses cocoa::base::id and platform::native_controls which are only available on macOS. Without the cfg guard, compilation fails on Linux and Windows. Co-Authored-By: Claude Opus 4.6 --- crates/gpui/src/elements/native_element_helpers.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/gpui/src/elements/native_element_helpers.rs b/crates/gpui/src/elements/native_element_helpers.rs index 25ad741..ba08c16 100644 --- a/crates/gpui/src/elements/native_element_helpers.rs +++ b/crates/gpui/src/elements/native_element_helpers.rs @@ -65,6 +65,7 @@ pub(super) fn schedule_native_focus_callback( /// /// # Safety /// Both pointers must be valid ObjC objects (or null for target_ptr). +#[cfg(target_os = "macos")] pub(super) unsafe fn cleanup_native_control( control_ptr: *mut c_void, target_ptr: *mut c_void,