Skip to content

Commit cfd60fc

Browse files
committed
Fix linux compilation
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
1 parent c4de7d1 commit cfd60fc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/unix.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,17 +191,17 @@ impl Client {
191191
// I tested this on macOS 14 and Linux 6.5.13
192192
#[cfg(target_os = "linux")]
193193
if let (Ok(read), Ok(write)) = (
194-
File::open(format!("/dev/fd/{}", read)),
195-
OpenOptions::new()
194+
File::open(format!("/dev/fd/{}", read.as_raw_fd())),
195+
fs::OpenOptions::new()
196196
.write(true)
197-
.open(format!("/dev/fd/{}", write)),
197+
.open(format!("/dev/fd/{}", write.as_raw_fd())),
198198
) {
199-
return Ok(Some(Client {
199+
return Some(Client {
200200
read,
201201
write,
202202
creation_arg,
203203
owns_fifo: false,
204-
}));
204+
});
205205
}
206206
if let Some(jobserver) =
207207
Self::from_fifo(Path::new(&format!("/dev/fd/{}", read.as_raw_fd())))

0 commit comments

Comments
 (0)