summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-10-26 02:48:20 +0000
committerbors <bors@rust-lang.org>2021-10-26 02:48:20 +0000
commitac2538fd3f7677037cac9bd84c13ec68293baf5f (patch)
tree7f037221a20b5430a20404be2f7a666ede1d15d9
parentba79bfac1f7b63c0228f2344046e2a8e76e66b57 (diff)
parentf4dd93b970b8c3424e3220e7b2ef80527958907e (diff)
downloadrust-libc-ac2538fd3f7677037cac9bd84c13ec68293baf5f.tar.gz
Auto merge of #2481 - devnexen:solarish_setpflags, r=Amanieu
solarish add process pflags api.
-rw-r--r--libc-test/build.rs1
-rw-r--r--src/unix/solarish/mod.rs12
2 files changed, 13 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 3d1e8a856c..c24986ff8d 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -768,6 +768,7 @@ fn test_solarish(target: &str) {
"sys/loadavg.h",
"sys/mman.h",
"sys/mount.h",
+ "sys/priv.h",
"sys/pset.h",
"sys/resource.h",
"sys/socket.h",
diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs
index 6c83871be0..22cc3600d3 100644
--- a/src/unix/solarish/mod.rs
+++ b/src/unix/solarish/mod.rs
@@ -2192,6 +2192,15 @@ pub const SCHED_IA: ::c_int = 4;
pub const SCHED_FSS: ::c_int = 5;
pub const SCHED_FX: ::c_int = 6;
+// sys/priv.h
+pub const PRIV_DEBUG: ::c_uint = 0x0001;
+pub const PRIV_AWARE: ::c_uint = 0x0002;
+pub const PRIV_AWARE_INHERIT: ::c_uint = 0x0004;
+pub const __PROC_PROTECT: ::c_uint = 0x0008;
+pub const NET_MAC_AWARE: ::c_uint = 0x0010;
+pub const NET_MAC_AWARE_INHERIT: ::c_uint = 0x0020;
+pub const PRIV_AWARE_RESET: ::c_uint = 0x0040;
+
// As per sys/socket.h, header alignment must be 8 bytes on SPARC
// and 4 bytes everywhere else:
#[cfg(target_arch = "sparc64")]
@@ -2760,6 +2769,9 @@ extern "C" {
pub fn gethostid() -> ::c_long;
pub fn sethostid(hostid: ::c_long) -> ::c_int;
+
+ pub fn getpflags(flags: ::c_uint) -> ::c_uint;
+ pub fn setpflags(flags: ::c_uint, value: ::c_uint) -> ::c_int;
}
mod compat;