Skip to content

Commit

Permalink
fixing linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
GyulyVGC committed Mar 4, 2024
1 parent 3e71fa9 commit da50ddd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn get_all_processes() -> Vec<Process> {
let proc_root = PathBuf::from(ROOT).join(pid.to_string());

// for 2.6.39 <= kernel < 3.6 fstat doesn't support O_PATH see https://github.com/eminence/procfs/issues/265
let flags = match *KERNEL {
let flags = match KERNEL {
Some(v) if v < String::from("3.6.0") => OFlags::DIRECTORY | OFlags::CLOEXEC,
Some(_) | None => OFlags::PATH | OFlags::DIRECTORY | OFlags::CLOEXEC,
};
Expand Down Expand Up @@ -153,7 +153,7 @@ fn get_socket_inodes<P: AsRef<Path>, Q: AsRef<Path>>(
let p = path.as_ref();
let root = base.as_ref().join(p);
// for 2.6.39 <= kernel < 3.6 fstat doesn't support O_PATH see https://github.com/eminence/procfs/issues/265
let flags = match *KERNEL {
let flags = match KERNEL {
Some(v) if v < String::from("3.6.0") => OFlags::NOFOLLOW | OFlags::CLOEXEC,
Some(_) | None => OFlags::NOFOLLOW | OFlags::PATH | OFlags::CLOEXEC,
};
Expand Down

0 comments on commit da50ddd

Please sign in to comment.