From f1d56f669d7566f644049fbbae7e967ee3180e55 Mon Sep 17 00:00:00 2001 From: m-hilgendorf Date: Tue, 2 Oct 2018 11:04:56 -0700 Subject: [PATCH] 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`. --- src/unix/bsd/apple/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 8c487811a1399..b627368db7354 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -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;