From d785405268a648fe2b0f96bb67d40f56907aa66d Mon Sep 17 00:00:00 2001 From: Christopher Nielsen Date: Tue, 31 May 2022 17:08:04 -0400 Subject: [PATCH] credentials: macos: check for existence of LOCAL_PEERPID - Fixes build errors for macOS 10.7 and earlier, where this is not supported --- gio/gsocket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gio/gsocket.c b/gio/gsocket.c index 288502792..bd5549f3a 100644 --- a/gio/gsocket.c +++ b/gio/gsocket.c @@ -6077,12 +6077,14 @@ g_socket_get_credentials (GSocket *socket, G_CREDENTIALS_NATIVE_TYPE, &cred); +#ifdef LOCAL_PEERPID if (getsockopt (socket->priv->fd, SOL_LOCAL, LOCAL_PEERPID, &pid, &optlen) == 0) _g_credentials_set_local_peerid (ret, pid); +#endif } else {