summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-08-11 15:39:00 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-08-11 15:39:00 -0400
commit3e9be279725ebfa4be4e572061ab76a4e5f47066 (patch)
treedda08bc9c4d3536e236b26937c56fb9398ad874b /src
parent1507cc211f6ce5b4f20f83470eacf44755a0cdcc (diff)
downloadbfs-3e9be279725ebfa4be4e572061ab76a4e5f47066.tar.xz
sighook: Disable semaphores on NetBSD
Diffstat (limited to 'src')
-rw-r--r--src/sighook.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sighook.c b/src/sighook.c
index 3f60405..0e9fddb 100644
--- a/src/sighook.c
+++ b/src/sighook.c
@@ -29,7 +29,8 @@
#include <stdlib.h>
#include <unistd.h>
-#ifdef _POSIX_SEMAPHORES
+// NetBSD opens a file descriptor for each sem_init()
+#if defined(_POSIX_SEMAPHORES) && !__NetBSD__
# define BFS_POSIX_SEMAPHORES _POSIX_SEMAPHORES
#else
# define BFS_POSIX_SEMAPHORES (-1)