Skip to content

Commit 5746f8e

Browse files
GuillaumeGomeztgross35
authored andcommitted
Add missing macos proc types and constants
(backport <#4310>) (cherry picked from commit f3c54e8)
1 parent 29a40e2 commit 5746f8e

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
@@ -1303,6 +1303,12 @@ s! {
13031303
pub ctl_id: u32,
13041304
pub ctl_name: [c_char; MAX_KCTL_NAME],
13051305
}
1306+
1307+
// sys/proc_info.h
1308+
pub struct proc_fdinfo {
1309+
pub proc_fd: i32,
1310+
pub proc_fdtype: u32,
1311+
}
13061312
}
13071313

13081314
s_no_extra_traits! {
@@ -5139,6 +5145,21 @@ pub const PROC_PIDTASKINFO: c_int = 4;
51395145
pub const PROC_PIDTHREADINFO: c_int = 5;
51405146
pub const PROC_PIDVNODEPATHINFO: c_int = 9;
51415147
pub const PROC_PIDPATHINFO_MAXSIZE: c_int = 4096;
5148+
5149+
pub const PROC_PIDLISTFDS: c_int = 1;
5150+
pub const PROC_PIDLISTFD_SIZE: c_int = mem::size_of::<proc_fdinfo>() as c_int;
5151+
pub const PROX_FDTYPE_ATALK: c_int = 0;
5152+
pub const PROX_FDTYPE_VNODE: c_int = 1;
5153+
pub const PROX_FDTYPE_SOCKET: c_int = 2;
5154+
pub const PROX_FDTYPE_PSHM: c_int = 3;
5155+
pub const PROX_FDTYPE_PSEM: c_int = 4;
5156+
pub const PROX_FDTYPE_KQUEUE: c_int = 5;
5157+
pub const PROX_FDTYPE_PIPE: c_int = 6;
5158+
pub const PROX_FDTYPE_FSEVENTS: c_int = 7;
5159+
pub const PROX_FDTYPE_NETPOLICY: c_int = 9;
5160+
pub const PROX_FDTYPE_CHANNEL: c_int = 10;
5161+
pub const PROX_FDTYPE_NEXUS: c_int = 11;
5162+
51425163
pub const PROC_CSM_ALL: c_uint = 0x0001;
51435164
pub const PROC_CSM_NOSMT: c_uint = 0x0002;
51445165
pub const PROC_CSM_TECS: c_uint = 0x0004;

0 commit comments

Comments
 (0)