summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid CARLIER <devnexen@gmail.com>2021-10-26 21:02:13 +0100
committerDavid CARLIER <devnexen@gmail.com>2021-10-26 21:02:13 +0100
commit799f3dfd8bcb312497d285936cfae24132ca6924 (patch)
tree707c4f65d2d51a475ef7aaa5cd18f39535a9e055
parentac2538fd3f7677037cac9bd84c13ec68293baf5f (diff)
downloadrust-libc-799f3dfd8bcb312497d285936cfae24132ca6924.tar.gz
darwin add posix_spawn specific extensions for universal binaries
purpose.
-rw-r--r--libc-test/semver/apple.txt3
-rw-r--r--src/unix/bsd/apple/mod.rs20
2 files changed, 23 insertions, 0 deletions
diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt
index b80ae26568..e01d39fb4c 100644
--- a/libc-test/semver/apple.txt
+++ b/libc-test/semver/apple.txt
@@ -1656,6 +1656,7 @@ fdopendir
fgetxattr
flistxattr
fmemopen
+fmount
forkpty
freeifaddrs
freelocale
@@ -1796,11 +1797,13 @@ posix_spawn_file_actions_destroy
posix_spawn_file_actions_init
posix_spawn_file_actions_t
posix_spawnattr_destroy
+posix_spawnattr_getarchpref_np
posix_spawnattr_getflags
posix_spawnattr_getpgroup
posix_spawnattr_getsigdefault
posix_spawnattr_getsigmask
posix_spawnattr_init
+posix_spawnattr_setarchpref_np
posix_spawnattr_setflags
posix_spawnattr_setpgroup
posix_spawnattr_setsigdefault
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs
index 876039119b..7e9a0616bd 100644
--- a/src/unix/bsd/apple/mod.rs
+++ b/src/unix/bsd/apple/mod.rs
@@ -4934,6 +4934,12 @@ extern "C" {
flags: ::c_int,
data: *mut ::c_void,
) -> ::c_int;
+ pub fn fmount(
+ src: *const ::c_char,
+ fd: ::c_int,
+ flags: ::c_int,
+ data: *mut ::c_void,
+ ) -> ::c_int;
pub fn ptrace(request: ::c_int, pid: ::pid_t, addr: *mut ::c_char, data: ::c_int) -> ::c_int;
pub fn quotactl(
special: *const ::c_char,
@@ -5110,6 +5116,20 @@ extern "C" {
flags: *mut ::pid_t,
) -> ::c_int;
pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int;
+ pub fn posix_spawnattr_setarchpref_np(
+ attr: *mut posix_spawnattr_t,
+ count: ::size_t,
+ pref: *mut ::cpu_type_t,
+ subpref: *mut ::cpu_subtype_t,
+ ocount: *mut ::size_t,
+ ) -> ::c_int;
+ pub fn posix_spawnattr_getarchpref_np(
+ attr: *const posix_spawnattr_t,
+ count: ::size_t,
+ pref: *mut ::cpu_type_t,
+ subpref: *mut ::cpu_subtype_t,
+ ocount: *mut ::size_t,
+ ) -> ::c_int;
pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int;
pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int;