From 3f083f57de0de1295ffa8f3f194b4d1e0ae57d6f Mon Sep 17 00:00:00 2001 From: MattJackson <1085847+MattJackson@users.noreply.github.com> Date: Mon, 6 Apr 2026 12:55:30 -0700 Subject: [PATCH] Fix SG_IO type for musl compatibility --- src/scsi.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scsi.rs b/src/scsi.rs index 95b23bd..79c28a3 100644 --- a/src/scsi.rs +++ b/src/scsi.rs @@ -36,7 +36,7 @@ pub trait ScsiTransport { // ─── Linux: SG_IO ─────────────────────────────────────────────────────────── #[cfg(target_os = "linux")] -const SG_IO: libc::c_ulong = 0x2285; +const SG_IO: u32 = 0x2285; #[cfg(target_os = "linux")] const SG_DXFER_NONE: i32 = -1; #[cfg(target_os = "linux")] @@ -130,7 +130,7 @@ impl ScsiTransport for SgIoTransport { hdr.timeout = timeout_ms; let ret = unsafe { - libc::ioctl(self.fd, SG_IO, &mut hdr as *mut sg_io_hdr) + libc::ioctl(self.fd, SG_IO as _, &mut hdr as *mut sg_io_hdr) }; if ret < 0 {