libsystemd - apply patch for nix 0.24
Peter Michael Green
1 year, 10 months ago
|
0 |
rust-libsystemd (0.2.1-4) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
|
|
1 |
|
|
2 |
* Team upload.
|
|
3 |
* Package libsystemd 0.2.1 from crates.io using debcargo 2.5.0
|
|
4 |
* Apply upstream patch to fix build with nix 0.24 by using mq_getattr from
|
|
5 |
rust-libc directly rather than the wrapper from rust-nix. (Closes: 1012702)
|
|
6 |
|
|
7 |
-- Peter Michael Green <plugwash@debian.org> Sun, 12 Jun 2022 14:50:15 +0000
|
|
8 |
|
0 | 9 |
rust-libsystemd (0.2.1-3) unstable; urgency=medium
|
1 | 10 |
|
2 | 11 |
* Team upload.
|
|
0 |
commit eb9ea392636681bdea35a89b782edbb8010897f0
|
|
1 |
Author: Jonah Petri <jonah@petri.us>
|
|
2 |
Date: Thu Feb 24 11:10:09 2022 -0500
|
|
3 |
|
|
4 |
fix build for compatibility with nix 0.24
|
|
5 |
|
|
6 |
See https://github.com/lucab/libsystemd-rs/issues/107.
|
|
7 |
|
|
8 |
diff --git a/src/activation.rs b/src/activation.rs
|
|
9 |
index 1c751dc78..9a0dd9d3f 100644
|
|
10 |
--- a/src/activation.rs
|
|
11 |
+++ b/src/activation.rs
|
|
12 |
@@ -2,1 +2,0 @@
|
|
13 |
-use nix::mqueue::mq_getattr;
|
|
14 |
@@ -192,7 +191,12 @@ impl IsType for RawFd {
|
|
15 |
}
|
|
16 |
|
|
17 |
fn is_mq(&self) -> bool {
|
|
18 |
- mq_getattr(*self).is_ok()
|
|
19 |
+ // `nix` does not enable us to test if a raw fd is a mq, so we must drop to libc here.
|
|
20 |
+ // SAFETY: `mq_getattr` is specified to return -1 when passed a fd which is not a mq.
|
|
21 |
+ // Furthermore, we ignore `attr` and rely only on the return value.
|
|
22 |
+ let mut attr = std::mem::MaybeUninit::<libc::mq_attr>::uninit();
|
|
23 |
+ let res = unsafe { libc::mq_getattr(*self, attr.as_mut_ptr()) };
|
|
24 |
+ res == 0
|
|
25 |
}
|
|
26 |
}
|
|
27 |
|
0 | 0 |
relax-deps.patch
|
1 | 1 |
new-hmac-api.patch
|
2 | 2 |
bump-sha2.patch
|
|
3 |
nix-0.24.patch
|