Skip to content

Commit 6b4478a

Browse files
committed
Add missing cfg
1 parent f5d51b6 commit 6b4478a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/shims/unix/fd.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ pub trait FileDescription: std::fmt::Debug + Any {
3838

3939
/// Reads as much as possible into the given buffer from a given offset,
4040
/// and returns the number of bytes read.
41+
#[cfg(unix)]
4142
fn pread<'tcx>(
4243
&mut self,
4344
_communicate_allowed: bool,
@@ -50,6 +51,7 @@ pub trait FileDescription: std::fmt::Debug + Any {
5051

5152
/// Writes as much as possible from the given buffer starting at a given offset,
5253
/// and returns the number of bytes written.
54+
#[cfg(unix)]
5355
fn pwrite<'tcx>(
5456
&mut self,
5557
_communicate_allowed: bool,
@@ -488,6 +490,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
488490
this.try_unwrap_io_result(result)
489491
}
490492

493+
#[cfg(unix)]
491494
fn pread(
492495
&mut self,
493496
fd: i32,
@@ -556,6 +559,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
556559
}
557560
}
558561

562+
#[cfg(unix)]
559563
fn pwrite(
560564
&mut self,
561565
fd: i32,

0 commit comments

Comments
 (0)