File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,9 @@ use self::libc::{c_int, c_void};
4242// #define MAXPATHLEN PATH_MAX
4343// in https://opensource.apple.com/source/xnu/xnu-792.25.20/bsd/sys/syslimits.h
4444// #define PATH_MAX 1024
45+ #[ cfg( target_os = "macos" ) ]
4546const MAXPATHLEN : usize = 1024 ;
47+ #[ cfg( target_os = "macos" ) ]
4648const PROC_PIDPATHINFO_MAXSIZE : usize = 4 * MAXPATHLEN ;
4749
4850// From http://opensource.apple.com//source/xnu/xnu-1456.1.26/bsd/sys/proc_info.h and
@@ -409,7 +411,7 @@ pub fn name(pid: i32) -> Result<String, String> {
409411*/
410412#[ cfg( target_os = "linux" ) ]
411413fn procfile_field ( filename : & str , fieldname : & str ) -> Result < String , String > {
412- const SEPARATOR : & ' static str = ":" ;
414+ const SEPARATOR : & str = ":" ;
413415 let lineheader = format ! ( "{}{}" , fieldname, SEPARATOR ) ;
414416
415417 // Open the file in read-only mode (ignoring errors).
You can’t perform that action at this time.
0 commit comments