Skip to content

Commit ac2538f

Browse files
committed
Auto merge of #2481 - devnexen:solarish_setpflags, r=Amanieu
solarish add process pflags api.
2 parents ba79bfa + f4dd93b commit ac2538f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,7 @@ fn test_solarish(target: &str) {
768768
"sys/loadavg.h",
769769
"sys/mman.h",
770770
"sys/mount.h",
771+
"sys/priv.h",
771772
"sys/pset.h",
772773
"sys/resource.h",
773774
"sys/socket.h",

src/unix/solarish/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2192,6 +2192,15 @@ pub const SCHED_IA: ::c_int = 4;
21922192
pub const SCHED_FSS: ::c_int = 5;
21932193
pub const SCHED_FX: ::c_int = 6;
21942194

2195+
// sys/priv.h
2196+
pub const PRIV_DEBUG: ::c_uint = 0x0001;
2197+
pub const PRIV_AWARE: ::c_uint = 0x0002;
2198+
pub const PRIV_AWARE_INHERIT: ::c_uint = 0x0004;
2199+
pub const __PROC_PROTECT: ::c_uint = 0x0008;
2200+
pub const NET_MAC_AWARE: ::c_uint = 0x0010;
2201+
pub const NET_MAC_AWARE_INHERIT: ::c_uint = 0x0020;
2202+
pub const PRIV_AWARE_RESET: ::c_uint = 0x0040;
2203+
21952204
// As per sys/socket.h, header alignment must be 8 bytes on SPARC
21962205
// and 4 bytes everywhere else:
21972206
#[cfg(target_arch = "sparc64")]
@@ -2760,6 +2769,9 @@ extern "C" {
27602769

27612770
pub fn gethostid() -> ::c_long;
27622771
pub fn sethostid(hostid: ::c_long) -> ::c_int;
2772+
2773+
pub fn getpflags(flags: ::c_uint) -> ::c_uint;
2774+
pub fn setpflags(flags: ::c_uint, value: ::c_uint) -> ::c_int;
27632775
}
27642776

27652777
mod compat;

0 commit comments

Comments
 (0)