From c7bda3f4ca7d7d281946aca33132f9b0f084c516 Mon Sep 17 00:00:00 2001 From: Thom Chiovoloni Date: Sun, 5 Dec 2021 13:18:47 -0800 Subject: [PATCH] Allow demo to link on macOS This is a work around for https://github.com/rust-windowing/winit/pull/2078 --- examples/demo.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/demo.rs b/examples/demo.rs index b5bf8598..404d0463 100644 --- a/examples/demo.rs +++ b/examples/demo.rs @@ -230,3 +230,8 @@ fn y8_to_rgba8(y8: u8) -> RGBA8 { fn rgb8_to_rgba8(rgb8: RGB8) -> RGBA8 { RGBA8 { r: rgb8.r, g: rgb8.g, b: rgb8.b, a: 0xFF } } + +// Work around for https://github.com/rust-windowing/winit/pull/2078 +#[cfg(target_os = "macos")] +#[link(name = "ColorSync", kind = "framework")] +extern "C" {}