summaryrefslogtreecommitdiff
path: root/src/sys/socket/sockopt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/socket/sockopt.rs')
-rw-r--r--src/sys/socket/sockopt.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sys/socket/sockopt.rs b/src/sys/socket/sockopt.rs
index dd24208f..90216649 100644
--- a/src/sys/socket/sockopt.rs
+++ b/src/sys/socket/sockopt.rs
@@ -492,6 +492,15 @@ sockopt_impl!(
libc::LOCAL_PEERCRED,
super::XuCred
);
+#[cfg(any(target_os = "macos", target_os = "ios"))]
+sockopt_impl!(
+ /// Get the PID of the peer process of a connected unix domain socket.
+ LocalPeerPid,
+ GetOnly,
+ 0,
+ libc::LOCAL_PEERPID,
+ libc::c_int
+);
#[cfg(any(target_os = "android", target_os = "linux"))]
sockopt_impl!(
/// Return the credentials of the foreign process connected to this socket.