mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-02-24 01:40:35 -05:00
build: fix build and provide compat for OpenBSD
- wayland-egl-abi-check: try to use llvm-nm first instead of BSD nm (incompatible options) - avoid forcing _POSIX_C_SOURCE=200809L (SOCK_CLOEXEC become available) - epoll(7) is provided by a userspace wrapper around kqueue(2) as FreeBSD - when using SO_PEERCRED, the struct to use is `struct sockpeercred` instead of `struct ucred` on OpenBSD - provide a compatibility layer for count_open_fds() using sysctl(2) as FreeBSD Signed-off-by: Sebastien Marie <semarie@online.fr>
This commit is contained in:
parent
791912c678
commit
d80bce5f1a
5 changed files with 41 additions and 3 deletions
|
|
@ -111,7 +111,11 @@ int
|
|||
wl_os_socket_peercred(int sockfd, uid_t *uid, gid_t *gid, pid_t *pid)
|
||||
{
|
||||
socklen_t len;
|
||||
#if defined(__OpenBSD__)
|
||||
struct sockpeercred ucred;
|
||||
#else
|
||||
struct ucred ucred;
|
||||
#endif
|
||||
|
||||
len = sizeof(ucred);
|
||||
if (getsockopt(sockfd, SOL_SOCKET, SO_PEERCRED, &ucred, &len) < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue