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
42
43
44
45
46
#![warn(rust_2018_idioms)]
pub use libc::{clockid_t, gid_t, iovec, pid_t, siginfo_t, signalfd_siginfo, size_t, uid_t};
pub use std::os::raw::{c_char, c_int, c_uint, c_void};
pub mod daemon;
pub mod event;
pub mod id128;
#[cfg(feature = "journal")]
pub mod journal;
pub mod login;
#[repr(C)]
pub struct const_iovec {
pub iov_base: *const c_void,
pub iov_len: size_t,
}
impl const_iovec {
pub unsafe fn from_str<T>(arg: T) -> Self
where
T: AsRef<str>,
{
const_iovec {
iov_base: arg.as_ref().as_ptr() as *const c_void,
iov_len: arg.as_ref().len() as size_t,
}
}
}
#[cfg(feature = "bus")]
pub mod bus;