Skip to content

Commit 708b019

Browse files
Add missing macos proc types and constants
1 parent 3914f82 commit 708b019

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,6 +1265,13 @@ s! {
12651265
pub ctl_id: u32,
12661266
pub ctl_name: [c_char; MAX_KCTL_NAME],
12671267
}
1268+
1269+
// sys/proc_info.h
1270+
pub struct proc_fdinfo {
1271+
pub proc_fd: i32,
1272+
pub proc_fdtype: u32,
1273+
}
1274+
12681275
}
12691276

12701277
s_no_extra_traits! {
@@ -4968,6 +4975,21 @@ pub const PROC_PIDTASKINFO: c_int = 4;
49684975
pub const PROC_PIDTHREADINFO: c_int = 5;
49694976
pub const PROC_PIDVNODEPATHINFO: c_int = 9;
49704977
pub const PROC_PIDPATHINFO_MAXSIZE: c_int = 4096;
4978+
4979+
pub const PROC_PIDLISTFDS: c_int = 1;
4980+
pub const PROC_PIDLISTFD_SIZE: c_int = mem::size_of::<proc_fdinfo>() as c_int;
4981+
pub const PROX_FDTYPE_ATALK: c_int = 0;
4982+
pub const PROX_FDTYPE_VNODE: c_int = 1;
4983+
pub const PROX_FDTYPE_SOCKET: c_int = 2;
4984+
pub const PROX_FDTYPE_PSHM: c_int = 3;
4985+
pub const PROX_FDTYPE_PSEM: c_int = 4;
4986+
pub const PROX_FDTYPE_KQUEUE: c_int = 5;
4987+
pub const PROX_FDTYPE_PIPE: c_int = 6;
4988+
pub const PROX_FDTYPE_FSEVENTS: c_int = 7;
4989+
pub const PROX_FDTYPE_NETPOLICY: c_int = 9;
4990+
pub const PROX_FDTYPE_CHANNEL: c_int = 10;
4991+
pub const PROX_FDTYPE_NEXUS: c_int = 11;
4992+
49714993
pub const PROC_CSM_ALL: c_uint = 0x0001;
49724994
pub const PROC_CSM_NOSMT: c_uint = 0x0002;
49734995
pub const PROC_CSM_TECS: c_uint = 0x0004;

0 commit comments

Comments
 (0)