From 26892c66b267499370afb92b4738e9488770c346 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 30 Sep 2021 17:29:46 +0200 Subject: [PATCH 1/5] headers: basename is defined under libgen.h --- modules/script.c | 1 + modules/xwindow.c | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/script.c b/modules/script.c index f323635..2ddd722 100644 --- a/modules/script.c +++ b/modules/script.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include diff --git a/modules/xwindow.c b/modules/xwindow.c index 3c8655e..3925f4f 100644 --- a/modules/xwindow.c +++ b/modules/xwindow.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include From 2e6847077ea2c6b8ebad5751ed1d9398cba47bb5 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 30 Sep 2021 17:30:32 +0200 Subject: [PATCH 2/5] signal: add the signal header needed for the signal functions --- particle.c | 1 + 1 file changed, 1 insertion(+) diff --git a/particle.c b/particle.c index 468bd28..1b06f9a 100644 --- a/particle.c +++ b/particle.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include From 6a9f66b837d0220e7c005d90f0c3fafa255aa3b1 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 30 Sep 2021 17:31:12 +0200 Subject: [PATCH 3/5] meson: add the library needed for the FreeBSD support --- meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 08d21bc..1970ec4 100644 --- a/meson.build +++ b/meson.build @@ -43,7 +43,9 @@ endif # Common dependencies dl = cc.find_library('dl') m = cc.find_library('m') -threads = dependency('threads') +threads = [dependency('threads'), cc.find_library('stdthreads', required: false)] +libepoll = dependency('epoll-shim', required: false) +libinotify = dependency('libinotify', required: false) pixman = dependency('pixman-1') yaml = dependency('yaml-0.1') @@ -117,7 +119,7 @@ yambar = executable( 'tag.c', 'tag.h', 'yml.c', 'yml.h', version, - dependencies: [bar, pixman, yaml, threads, dl, tllist, fcft] + + dependencies: [bar, libepoll, libinotify, pixman, yaml, threads, dl, tllist, fcft] + decorations + particles + modules, c_args: [plugin_mpd_enabled? '-DPLUGIN_ENABLED_MPD':[]], build_rpath: '$ORIGIN/modules:$ORIGIN/decorations:$ORIGIN/particles', From bfff39b7c923fd7eaaec86fe31f621f6c6380879 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 30 Sep 2021 17:28:36 +0200 Subject: [PATCH 4/5] main: cast sig_atomic_t to long, to fix the printf portability --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index e92e2e5..49d3985 100644 --- a/main.c +++ b/main.c @@ -374,7 +374,7 @@ main(int argc, char *const *argv) } if (aborted) - LOG_INFO("aborted: %s (%d)", strsignal(aborted), aborted); + LOG_INFO("aborted: %s (%ld)", strsignal(aborted), (long)aborted); done: /* Signal abort to other threads */ From 82c92185eabae2d1e8fc8ed1f4f1d42aa12cc427 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 30 Sep 2021 17:26:56 +0200 Subject: [PATCH 5/5] memfd: linux/memfd does not exist on FreeBSD memfd_create is defined in sys/mman.h on FreeBSD --- bar/wayland.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bar/wayland.c b/bar/wayland.c index 270b4ff..16af9fe 100644 --- a/bar/wayland.c +++ b/bar/wayland.c @@ -9,7 +9,9 @@ #include #include +#ifdef __linux__ #include +#endif #include #include