diff --git a/src/shm/raw.rs b/src/shm/raw.rs index a3e0821008..e29a138921 100644 --- a/src/shm/raw.rs +++ b/src/shm/raw.rs @@ -171,7 +171,7 @@ impl io::Seek for RawPool { impl RawPool { fn create_shm_fd() -> io::Result { - #[cfg(target_os = "linux")] + #[cfg(any(target_os = "linux", target_os = "freebsd"))] { match RawPool::create_memfd() { Ok(fd) => return Ok(fd), @@ -227,7 +227,7 @@ impl RawPool { } } - #[cfg(target_os = "linux")] + #[cfg(any(target_os = "linux", target_os = "freebsd"))] fn create_memfd() -> nix::Result { use std::ffi::CStr;