aboutsummaryrefslogtreecommitdiff
path: root/seatd
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2021-03-21 13:44:57 +0100
committerKenny Levinsen <kl@kl.wtf>2021-03-21 16:27:21 +0100
commit5ad91ae9dad205331ede6579b2b24b53e02a6287 (patch)
treeff3d64696a69cbf966bbf8b76021a1b4bf14c001 /seatd
parent0d855a28f20ab3d7b2058fbe58a172a97affbde5 (diff)
client: enable cr_pid on FreeBSD >= 12.3
https://cgit.freebsd.org/src/commit/?id=925f44f33862908f9a2e72520a17af148c7d0db5 https://cgit.freebsd.org/src/commit/?id=2b61bda2c75f30f6eadd18fb891fd885e4c8d19d
Diffstat (limited to 'seatd')
-rw-r--r--seatd/client.c2
1 files changed, 1 insertions, 1 deletions
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;