]> git.mdlowis.com Git - proto/labwc.git/commitdiff
labnag: fix FreeBSD signalfd() build error
authorJohan Malm <jgm323@gmail.com>
Fri, 8 Aug 2025 18:17:22 +0000 (19:17 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sat, 9 Aug 2025 09:44:03 +0000 (10:44 +0100)
.github/workflows/build.yml
clients/labnag.c
clients/meson.build
scripts/checkpatch.pl

index 892d88670b13a6959618a27a044ba72c7ed8e25a..b0ff305308bf2b21ed900ae47fd81adf75490bb5 100644 (file)
@@ -103,7 +103,8 @@ jobs:
             sed -i '' 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
             pkg set -yn pkg:mesa-dri # hack to skip llvm dependency
             pkg install -y git meson gcc pkgconf cairo pango evdev-proto \
-              hwdata wayland-protocols wlroots019 libdisplay-info
+              hwdata wayland-protocols libdisplay-info libepoll-shim \
+              wlroots019
           run: echo "setup done"
 
       - name: Install Void Linux dependencies
index 514ac86499de196edfe5a7e3108348d790cd37dd..fa3c3aea62572a4c2f84e83afb1631532ce1fbc6 100644 (file)
@@ -17,6 +17,9 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <strings.h>
+#ifdef __FreeBSD__
+#include <sys/event.h> /* For signalfd() */
+#endif
 #include <sys/signalfd.h>
 #include <sys/stat.h>
 #include <sys/timerfd.h>
index 7c6fa5a5fe983344d09aadf75334de0e2d2bef35..3a80a4f0ad02b259a235b4770119cbdf06398919 100644 (file)
@@ -30,6 +30,13 @@ foreach xml : protocols
   )
 endforeach
 
+if host_machine.system() in ['freebsd', 'openbsd']
+  # For signalfd()
+  epoll_dep = dependency('epoll-shim')
+else
+  epoll_dep = []
+endif
+
 executable(
   'labnag',
   nag_sources,
@@ -41,6 +48,7 @@ executable(
     wayland_cursor,
     wlroots,
     server_protos,
+    epoll_dep,
   ],
        install: true
 )
index f9e9d1d9ab04d47f7ba281888fa146016617e25b..933dbc593f7cc0f74edb3d9abdf4a33b6dd1341c 100755 (executable)
@@ -5659,6 +5659,7 @@ sub process {
                            $var !~ /^(?:_?Pango\w+)/ &&
                            $var !~ /^(?:xml\w+)/ &&
                            $var !~ /^(?:GString|GError|GHashTable)/ &&
+                           $var !~ /^(?:__FreeBSD__)/ &&
                            $var !~ /^(?:RsvgRectangle|RsvgHandle)/ &&
                            $var !~ /^(?:XKB_KEY_XF86Switch_VT_1)/ &&