Skip to content

Commit 44d5fea

Browse files
committed
remove makedev in test_stat.rs for it is only implemented in linux.
1 parent 69568e7 commit 44d5fea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_stat.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use libc::{S_IFMT, S_IFLNK, mode_t};
99

1010
use nix::{fcntl, Error};
1111
use nix::errno::{Errno};
12-
use nix::sys::stat::{self, fchmod, fchmodat, futimens, stat, utimes, utimensat, mkdirat, makedev, mknod, mknodat};
12+
use nix::sys::stat::{self, fchmod, fchmodat, futimens, stat, utimes, utimensat, mkdirat, mknod, mknodat};
1313
#[cfg(any(target_os = "linux",
1414
target_os = "haiku",
1515
target_os = "ios",
@@ -325,7 +325,7 @@ fn test_mknod_success_mode() {
325325

326326
#[test]
327327
fn test_mknod_success_dev() {
328-
let expected_dev_t = makedev(109, 234);
328+
let expected_dev_t = 28138u64;
329329
let tempdir = tempfile::tempdir().unwrap();
330330
let path = &tempdir.path().join("test_node_name");
331331
assert!(mknod(
@@ -409,7 +409,7 @@ fn test_mknodat_success_mode() {
409409
#[test]
410410
#[cfg(not(any(target_os = "ios", target_os = "macos")))]
411411
fn test_mknodat_success_dev() {
412-
let expected_dev_t = makedev(206, 197);
412+
let expected_dev_t = 52933u64;
413413
let tempdir = tempfile::tempdir().unwrap();
414414
let dirfd = fcntl::open(tempdir.path(), fcntl::OFlag::empty(), stat::Mode::empty()).unwrap();
415415
let path = "test_node_name";

0 commit comments

Comments
 (0)