mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
Don't call getsockopt with SO_PEERCRED and SO_PEERSEC parameters on FreeBSD.
This commit is contained in:
parent
33df224254
commit
6ea24a7db5
1 changed files with 2 additions and 0 deletions
|
|
@ -335,6 +335,7 @@ static struct pw_client *client_new(struct server *s, int fd)
|
||||||
if (props == NULL)
|
if (props == NULL)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
|
#ifndef __FreeBSD__
|
||||||
len = sizeof(ucred);
|
len = sizeof(ucred);
|
||||||
if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &ucred, &len) < 0) {
|
if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &ucred, &len) < 0) {
|
||||||
pw_log_error("server %p: no peercred: %m", s);
|
pw_log_error("server %p: no peercred: %m", s);
|
||||||
|
|
@ -350,6 +351,7 @@ static struct pw_client *client_new(struct server *s, int fd)
|
||||||
} else {
|
} else {
|
||||||
pw_properties_setf(props, PW_KEY_SEC_LABEL, "%s", buffer);
|
pw_properties_setf(props, PW_KEY_SEC_LABEL, "%s", buffer);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
pw_properties_setf(props, PW_KEY_MODULE_ID, "%d", d->module->global->id);
|
pw_properties_setf(props, PW_KEY_MODULE_ID, "%d", d->module->global->id);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue