From c43ba06b5bfe5a0180e41fd47deb1c119c4fb6dd Mon Sep 17 00:00:00 2001 From: MattJackson <1085847+MattJackson@users.noreply.github.com> Date: Mon, 13 Apr 2026 00:22:19 +0000 Subject: [PATCH] Fix macOS build: mark MacScsiTransport as Send IOKit COM interface pointers are Mach port references, safe to send between threads. The Send bound added in 0.8.1 broke macOS builds. --- Cargo.toml | 2 +- src/scsi/macos.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 2dfcaac..5f6d253 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libfreemkv" -version = "0.8.1" +version = "0.8.2" edition = "2021" license = "AGPL-3.0-only" description = "Open source raw disc access library for optical drives" diff --git a/src/scsi/macos.rs b/src/scsi/macos.rs index 3a202ee..5c38e5e 100644 --- a/src/scsi/macos.rs +++ b/src/scsi/macos.rs @@ -168,6 +168,9 @@ pub struct MacScsiTransport { exclusive: bool, } +// IOKit COM interface pointers are Mach port references — safe to send between threads. +unsafe impl Send for MacScsiTransport {} + impl MacScsiTransport { pub fn open(device: &Path) -> Result { let dev_str = device.to_str().ok_or_else(|| Error::DeviceNotFound {