From: Arnaud Ferraris Date: Tue, 24 Sep 2024 13:13:35 +0200 Subject: src: manual: fix build issues with glib 2.82 The gir file for this version doesn't contain the `GType` type definition although it is still widely used, we must therefore declare it manually. Moreover, `libc::utimbuf` isn't automatically imported although it is needed for `g_utime`, so we must add this as well. Forwarded: not-needed --- src/manual.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/manual.rs b/src/manual.rs index 47f334f..d18a9c9 100644 --- a/src/manual.rs +++ b/src/manual.rs @@ -1,9 +1,9 @@ // Take a look at the license at the top of the repository in the LICENSE file. #[cfg(unix)] -pub use libc::passwd; +pub use libc::{passwd, utimbuf}; #[allow(unused_imports)] -use libc::{c_char, c_int, c_ushort, c_void}; +use libc::{c_char, c_int, c_ushort, c_void, size_t}; #[cfg(all(not(unix), docsrs))] #[repr(C)] @@ -77,6 +77,8 @@ mod win32 { } } +pub type GType = size_t; + // These are all non-NUL terminated strings in C pub const G_VARIANT_TYPE_BOOLEAN: &str = "b"; pub const G_VARIANT_TYPE_BYTE: &str = "y";