From 5ad91ae9dad205331ede6579b2b24b53e02a6287 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sun, 21 Mar 2021 13:44:57 +0100 Subject: client: enable cr_pid on FreeBSD >= 12.3 https://cgit.freebsd.org/src/commit/?id=925f44f33862908f9a2e72520a17af148c7d0db5 https://cgit.freebsd.org/src/commit/?id=2b61bda2c75f30f6eadd18fb891fd885e4c8d19d --- seatd/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seatd/client.c b/seatd/client.c index d0f321d..1bfe94a 100644 --- a/seatd/client.c +++ b/seatd/client.c @@ -40,7 +40,7 @@ static int get_peer(int fd, pid_t *pid, uid_t *uid, gid_t *gid) { if (getsockopt(fd, 0, LOCAL_PEERCRED, &cred, &len) == -1) { return -1; } -#if __FreeBSD_version >= 1300030 +#if __FreeBSD_version >= 1300030 || (__FreeBSD_version >= 1202506 && __FreeBSD_version < 1300000) *pid = cred.cr_pid; #else *pid = -1; -- cgit v1.2.3