Skip to content

Commit 1c65dda

Browse files
authored
Merge pull request #4310 from GuillaumeGomez/mac-proc-info
Add missing macos proc types and constants
2 parents 0ad0aa6 + f3c54e8 commit 1c65dda

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/unix/bsd/apple/mod.rs

+21
Original file line numberDiff line numberDiff line change
@@ -1265,6 +1265,12 @@ 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+
}
12681274
}
12691275

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

0 commit comments

Comments
 (0)