mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
Add support for MidnightBSD
Fix build issue Fix build issue
This commit is contained in:
parent
4922aed6c6
commit
6a15a02ec2
20 changed files with 35 additions and 35 deletions
|
|
@ -38,7 +38,7 @@
|
|||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
#if defined(__FreeBSD__)
|
||||
#if defined(__FreeBSD__) || defined(__MidnightBSD__)
|
||||
#include <sys/ucred.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -534,7 +534,7 @@ static struct client_data *client_new(struct server *s, int fd)
|
|||
struct pw_impl_client *client;
|
||||
struct pw_protocol *protocol = s->this.protocol;
|
||||
socklen_t len;
|
||||
#if defined(__FreeBSD__)
|
||||
#if defined(__FreeBSD__) || defined(__MidnightBSD__)
|
||||
struct xucred xucred;
|
||||
#else
|
||||
struct ucred ucred;
|
||||
|
|
@ -583,7 +583,7 @@ static struct client_data *client_new(struct server *s, int fd)
|
|||
(int)len, buffer);
|
||||
}
|
||||
}
|
||||
#elif defined(__FreeBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__MidnightBSD__)
|
||||
len = sizeof(xucred);
|
||||
if (getsockopt(fd, 0, LOCAL_PEERCRED, &xucred, &len) < 0) {
|
||||
pw_log_warn("server %p: no peercred: %m", s);
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ pid_t get_client_pid(struct client *client, int client_fd)
|
|||
pw_log_warn("client %p: no peercred: %m", client);
|
||||
} else
|
||||
return ucred.pid;
|
||||
#elif defined(__FreeBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__MidnightBSD__)
|
||||
struct xucred xucred;
|
||||
len = sizeof(xucred);
|
||||
if (getsockopt(client_fd, 0, LOCAL_PEERCRED, &xucred, &len) < 0) {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef __FreeBSD__
|
||||
#if defined(__FreeBSD__) || defined(__MidnightBSD__)
|
||||
#include <sys/thr.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
|
|
@ -205,7 +205,7 @@ static pid_t _gettid(void)
|
|||
return (pid_t) gettid();
|
||||
#elif defined(__linux__)
|
||||
return syscall(SYS_gettid);
|
||||
#elif defined(__FreeBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__MidnightBSD__)
|
||||
long pid;
|
||||
thr_self(&pid);
|
||||
return (pid_t)pid;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue