Skip to content

Commit 4185098

Browse files
Remove comment, modify cfg[] statement, and remove warnings on macos
1 parent 2e7ff36 commit 4185098

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libproc/proc_pid.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::{mem, process};
1313
use std::path::PathBuf;
1414
use std::ptr;
1515

16-
#[cfg(not(target_os = "macos"))]
16+
#[cfg(target_os = "linux")]
1717
use libc::PATH_MAX;
1818

1919
use libc::pid_t;
@@ -24,7 +24,9 @@ use crate::libproc::task_info::{TaskAllInfo, TaskInfo};
2424
use crate::libproc::thread_info::ThreadInfo;
2525
use crate::libproc::work_queue_info::WorkQueueInfo;
2626

27-
use self::libc::{c_char, c_int, c_void, readlink};
27+
#[cfg(target_os = "linux")]
28+
use self::libc::{c_char, readlink};
29+
use self::libc::{c_int, c_void};
2830

2931
// Since we cannot access C macros for constants from Rust - I have had to redefine this, based on Apple's source code
3032
// See http://opensource.apple.com/source/Libc/Libc-594.9.4/darwin/libproc.c

0 commit comments

Comments
 (0)