lucab / libsystemd-rs

A pure-Rust client library to work with systemd
https://crates.io/crates/libsystemd
Other
106 stars 19 forks source link

activation: fix build for compatibility with nix 0.24 #108

Closed skrap closed 2 years ago

skrap commented 2 years ago

See https://github.com/lucab/libsystemd-rs/issues/107.

This should be compatible with existing code as well, as it just does what nix used to do. I don't see any way to check a FD in this way without unsafe, unfortunately!

lucab commented 2 years ago

Thanks for the PR! I'd be happier having no usafe involved in this, but I looked around and I think the new nix API does not really support our usecase anymore. I left a note at https://github.com/nix-rust/nix/pull/1639#issuecomment-1054267642 asking about that. In the meanwhile, I'm happy to merge this PR and possibly later re-adjust for a new safe API.

skrap commented 2 years ago

Thanks! And thanks for this crate! ⭐