fix build

This commit is contained in:
David Carlier 2024-06-23 09:56:02 +01:00
parent bd9ce3e074
commit fc50acae90
No known key found for this signature in database
GPG Key ID: D308BD11AB42D054

View File

@ -748,8 +748,7 @@ pub fn home_dir() -> Option<PathBuf> {
&mut result,
) {
0 if !result.is_null() => {
let passwd = p.assume_init();
let ptr = passwd.pw_dir as *const _;
let ptr = (*result).pw_dir as *const _;
let bytes = CStr::from_ptr(ptr).to_bytes().to_vec();
Some(OsStringExt::from_vec(bytes))
}