Skip to content

Commit

Permalink
Auto merge of #1088 - m-hilgendorf:patch-1, r=alexcrichton
Browse files Browse the repository at this point in the history
Add ftok on MacOS

Provide a symbol for the `ftok` function declared in sys/ipc.h, for completeness and to allow calling `ftok` to generate the key value for `shmat`.
  • Loading branch information
bors committed Oct 3, 2018
2 parents 4a1bae2 + f1d56f6 commit 3a04c32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2350,6 +2350,7 @@ extern {
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
-> ::c_int;
pub fn shm_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::c_int;
pub fn ftok(pathname : *const c_char, proj_id : ::c_int) -> key_t;
pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void,
shmflg: ::c_int) -> *mut ::c_void;
pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int;
Expand Down

0 comments on commit 3a04c32

Please sign in to comment.