summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDC <devnexen@gmail.com>2021-10-25 08:54:47 +0100
committerDC <devnexen@gmail.com>2021-10-25 08:54:47 +0100
commitf4dd93b970b8c3424e3220e7b2ef80527958907e (patch)
treebee75ab8c62379ec248fbe13ac5c4c0db877d96c
parent6877d17250388905289cc13377ac0c6a5131592e (diff)
downloadrust-libc-f4dd93b970b8c3424e3220e7b2ef80527958907e.tar.gz
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 d2737d0e34..943fce3056 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;