Package: rust-glib-sys-0.18 / 0.18.1-2

0001-src-manual-fix-build-issues-with-glib-2.82.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
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";