[glib: 1/2] credentials: macos: check for existence of LOCAL_PEERPID - Fixes build errors for macOS 10.7 and ear
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] credentials: macos: check for existence of LOCAL_PEERPID - Fixes build errors for macOS 10.7 and ear
- Date: Wed, 1 Jun 2022 13:11:41 +0000 (UTC)
commit d785405268a648fe2b0f96bb67d40f56907aa66d
Author: Christopher Nielsen <mascguy github com>
Date: Tue May 31 17:08:04 2022 -0400
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 2885027924..bd5549f3a2 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
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]