From e436f0d8e37422fbce2cb461864ee07a90e33fca Mon Sep 17 00:00:00 2001 From: user Date: Sun, 24 Nov 2024 17:51:48 +0300 Subject: [PATCH] fix build problem cloudflare/mmap-sync#20 --- src/locks.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/locks.rs b/src/locks.rs index 05ff308..88e2ae1 100644 --- a/src/locks.rs +++ b/src/locks.rs @@ -144,12 +144,14 @@ impl<'a> WriteLockStrategySealed<'a> for SingleWriter { } } +#[cfg(unix)] impl<'a> WriteLockStrategy<'a> for SingleWriter {} /// A simple guard which does not release the lock upon being dropped. #[cfg(unix)] pub struct SingleWriterGuard<'a>(&'a mut MmapMut); +#[cfg(unix)] impl<'a> Deref for SingleWriterGuard<'a> { type Target = MmapMut; @@ -158,6 +160,7 @@ impl<'a> Deref for SingleWriterGuard<'a> { } } +#[cfg(unix)] impl<'a> DerefMut for SingleWriterGuard<'a> { fn deref_mut(&mut self) -> &mut Self::Target { &mut *self.0