mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-29 11:00:02 +01:00
credentials: macos: check for existence of LOCAL_PEERPID
- Fixes build errors for macOS 10.7 and earlier, where this is not supported
This commit is contained in:
parent
a2e950a021
commit
e4271674cc
@ -6070,12 +6070,14 @@ g_socket_get_credentials (GSocket *socket,
|
|||||||
G_CREDENTIALS_NATIVE_TYPE,
|
G_CREDENTIALS_NATIVE_TYPE,
|
||||||
&cred);
|
&cred);
|
||||||
|
|
||||||
|
#ifdef LOCAL_PEERPID
|
||||||
if (getsockopt (socket->priv->fd,
|
if (getsockopt (socket->priv->fd,
|
||||||
SOL_LOCAL,
|
SOL_LOCAL,
|
||||||
LOCAL_PEERPID,
|
LOCAL_PEERPID,
|
||||||
&pid,
|
&pid,
|
||||||
&optlen) == 0)
|
&optlen) == 0)
|
||||||
_g_credentials_set_local_peerid (ret, pid);
|
_g_credentials_set_local_peerid (ret, pid);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user