mirror of
https://github.com/freemkv/libfreemkv.git
synced 2026-10-07 18:13:10 +00:00
Security - Remove the unsafe Vec::set_len over recycled sector buffers — UB reachable from safe code (GHSA-j8ww-f5fg-9pmh, low). Uses Vec::resize; pooling unchanged. CI / tooling - clippy on stable with the MSRV single-sourced from Cargo.toml; cargo-deny dependency-audit gate with first-party git sources allowed (#15); audience-based comment-guard (#17). Docs - README (keydb ownership, BD-J parser count), drive-access transport/reset notes, mux timeline module-doc links.
13 lines
563 B
Markdown
13 lines
563 B
Markdown
# src/io/platform_macos.rs
|
|
|
|
Shared macOS `fcntl(F_PREALLOCATE)` definitions.
|
|
|
|
The `libc` crate doesn't expose these symbols across all macOS SDK versions,
|
|
so we define them locally with values from `/usr/include/sys/fcntl.h`. Two
|
|
call sites ([`crate::io::writeback_file`] and `crate::io::sink::preallocate`)
|
|
need the same constants and `fstore_t` layout — keeping a single source of
|
|
truth here prevents the two copies from drifting.
|
|
|
|
Module-level cfg gate lives in the parent (`io/mod.rs`); this file is only
|
|
compiled on macOS, so no inner `#![cfg]` is needed.
|