From: Jérémie Galarneau Date: Wed, 14 Jul 2021 19:19:15 +0000 (-0400) Subject: Build fix: retrieve unix socket peer PID on non-unix platforms X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=4dc766fa8a92a9862c3f9d560751a941b4599380;hp=4dc766fa8a92a9862c3f9d560751a941b4599380;p=lttng-tools.git Build fix: retrieve unix socket peer PID on non-unix platforms The previous attempt at extending the credential retrieval wrapper was broken and didn't build on FreeBSD, macOS, and cygwin. A platform-specific way of retrieving the PID of a unix peer is implemented for FreeBSD (getsockopt using LOCAL_PEERCRED, note that the cr_pid field is only available from FreeBSD 13 and up), macOS (getsockopt using LOCAL_PEERPID, macOS 10.8+), and Solaris (getpeerucreds). Signed-off-by: Jérémie Galarneau Change-Id: Ifcf522c70ee4c2e0799293ae0961f41aebff5056 ---