Skip to content

Commit 1b5a42b

Browse files
committed
Fix patch for i8 err on arm64
1 parent fc1bef7 commit 1b5a42b

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

versions/v3.2.7/server/proxmox~fix-crypt-i8-err-on-arm.patch renamed to versions/v3.2.7/server/proxmox~fix-i8-err-on-arm.patch

+14-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ commit 585e751ad6cbf1d2fe212cca0004534ec9c8b472
22
Author: Kamil Trzciński <[email protected]>
33
Date: Thu Dec 12 20:29:27 2024 +0100
44

5-
Fix mismatched types on arm64 for `src/crypt.rs`
5+
Fix mismatched types on arm64 for `src/crypt.rs` and `src/fs/dir.rs`
66

77
--> /src/proxmox/proxmox-sys/src/crypt.rs:74:67
88
|
@@ -33,4 +33,17 @@ index 3313f668..a11c19f1 100644
3333
+ if output.first().is_none() || Some(&('*' as libc::c_char)) == output.first() {
3434
bail!("internal error: crypt_gensalt_rn could not create a valid salt");
3535
}
36+
diff --git a/proxmox-sys/src/fs/dir.rs b/proxmox-sys/src/fs/dir.rs
37+
index e4f45bbd..a982866c 100644
38+
--- a/proxmox-sys/src/fs/dir.rs
39+
+++ b/proxmox-sys/src/fs/dir.rs
40+
@@ -213,7 +213,7 @@ pub fn make_tmp_dir<P: AsRef<Path>>(
41+
// Push NULL byte so that we have a proper NULL-terminated string
42+
template.push(0);
43+
44+
- let returned_buffer = unsafe { libc::mkdtemp(template.as_mut_ptr() as *mut i8) };
45+
+ let returned_buffer = unsafe { libc::mkdtemp(template.as_mut_ptr() as *mut libc::c_char) };
46+
47+
// Check errno immediately, so that nothing else can overwrite it.
48+
let err = std::io::Error::last_os_error();
3649

0 commit comments

Comments
 (0)