mirror of
https://github.com/swaywm/sway.git
synced 2026-04-04 07:15:48 -04:00
Fix build on FreeBSD
- Make sure CMake always finds absolute paths for Cairo, Pango and GdkPixbuf - Add forgotten json-c include path to swaymsg/CMakeLists.txt - Disable -Werror because of assert warnings - Add correct /proc/pid/file path for FreeBSD - Use libepoll-shim on FreeBSD - Only use Linux capabilities on, well, Linux
This commit is contained in:
parent
d93e53fd4b
commit
da26d69cb1
11 changed files with 127 additions and 103 deletions
|
|
@ -126,6 +126,8 @@ struct sockaddr_un *ipc_user_sockaddr(void) {
|
|||
}
|
||||
|
||||
static pid_t get_client_pid(int client_fd) {
|
||||
// FreeBSD supports getting uid/gid, but not pid
|
||||
#ifdef __linux__
|
||||
struct ucred ucred;
|
||||
socklen_t len = sizeof(struct ucred);
|
||||
|
||||
|
|
@ -134,6 +136,9 @@ static pid_t get_client_pid(int client_fd) {
|
|||
}
|
||||
|
||||
return ucred.pid;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
int ipc_handle_connection(int fd, uint32_t mask, void *data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue