File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " libproc"
3- version = " 0.10 .1"
3+ version = " 0.11 .1"
44description = " A library to get information about running processes - for Mac OS X and Linux"
55authors = [
" Andrew Mackenzie <[email protected] >" ]
66repository = " https://github.com/andrewdavidmackenzie/libproc-rs"
Original file line number Diff line number Diff line change 11#[ cfg( target_os = "macos" ) ]
22fn main ( ) {
3+ use std:: env;
4+ use std:: path:: Path ;
5+
36 let bindings = bindgen:: builder ( )
47 . header_contents ( "libproc_rs.h" , "#include <libproc.h>" )
58 . generate ( )
69 . expect ( "Failed to build libproc bindings" ) ;
710
11+ let output_path = Path :: new ( & env:: var ( "OUT_DIR" ) . expect ( "OUT_DIR env var was not defined" ) )
12+ . join ( "osx_libproc_bindings.rs" ) ;
13+
814 bindings
9- . write_to_file ( "src/osx_libproc_bindings.rs" )
15+ . write_to_file ( output_path )
1016 . expect ( "Failed to write libproc bindings" ) ;
1117}
1218
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ extern crate libc;
1010extern crate errno;
1111
1212pub mod libproc;
13+
1314#[ cfg( target_os = "macos" ) ]
1415#[ allow( warnings, missing_docs) ]
15- mod osx_libproc_bindings;
16+ mod osx_libproc_bindings {
17+ include ! ( concat!( env!( "OUT_DIR" ) , "/osx_libproc_bindings.rs" ) ) ;
18+ }
You can’t perform that action at this time.
0 commit comments