fix: ioctl cast for musl ci (E0308, c_void)
CI / check (push) Failing after 6s

This commit is contained in:
changchichung
2026-09-02 10:04:59 +08:00
parent e7dd69750d
commit d0b1688ff2
+1 -1
View File
@@ -418,7 +418,7 @@ fn get_size_via_ioctl(path: &Path) -> Result<u64, WipeError> {
let mut size: u64 = 0;
// BLKGETSIZE64 = _IOR(0x12,114,size_t) => 0x80081272 on x86_64
const BLKGETSIZE64: libc::c_ulong = 0x80081272;
let ret = unsafe { libc::ioctl(fd, BLKGETSIZE64 as libc::c_ulong, &mut size as *mut u64) };
let ret = unsafe { libc::ioctl(fd, BLKGETSIZE64 as _, &mut size as *mut u64 as *mut libc::c_void) };
if ret == 0 {
Ok(size)
} else {