diff --git a/gdk4-win32/src/lib.rs b/gdk4-win32/src/lib.rs index 205938b07e23..6a55692811cd 100644 --- a/gdk4-win32/src/lib.rs +++ b/gdk4-win32/src/lib.rs @@ -4,6 +4,7 @@ #![allow(deprecated)] #![cfg_attr(docsrs, feature(doc_cfg))] +#[cfg(not(all(feature = "win32", windows)))] use std::ffi::c_void; pub use gdk; diff --git a/gdk4-win32/src/win32_hcursor.rs b/gdk4-win32/src/win32_hcursor.rs index a93cc2d2e12f..0b6d8bfd92a1 100644 --- a/gdk4-win32/src/win32_hcursor.rs +++ b/gdk4-win32/src/win32_hcursor.rs @@ -25,6 +25,6 @@ impl Win32HCursor { pub fn handle(&self) -> HCURSOR { let ptr: NonNull = ObjectExt::property(self, "handle"); - HCURSOR(ptr.as_ptr() as *mut c_void) + HCURSOR(ptr.as_ptr()) } }