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.lttng.org./?a=commitdiff_plain;h=9bc1a4b4f0dc0dab6be2ea56d0cbdf4d703865f5;hp=9bc1a4b4f0dc0dab6be2ea56d0cbdf4d703865f5;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 ---