aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2025-12-24 10:04:28 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2025-12-24 10:04:28 -0500
commit67c290158cdb12b755c17b404f0eb63bc40eac73 (patch)
treef91672e659702ffaee916dd8bb11d780a192fbdc /src
parentdf4c6e0b0df7b9839b11da53f03f69ed6d0c9244 (diff)
downloadstasis-67c290158cdb12b755c17b404f0eb63bc40eac73.tar.gz
Fix undefined PSEMNAMLEN on Darwin
Diffstat (limited to 'src')
-rw-r--r--src/lib/core/include/sem.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/core/include/sem.h b/src/lib/core/include/sem.h
index 583770a..b8f9a39 100644
--- a/src/lib/core/include/sem.h
+++ b/src/lib/core/include/sem.h
@@ -6,6 +6,11 @@
#include "core.h"
#include <semaphore.h>
+#if defined(STASIS_OS_DARWIN)
+// Darwin's sem_open() limits the path length to PSEMNAMLEN
+// even though it isn't used directly.
+#include <sys/posix_sem.h> // PSEMNAMLEN
+#endif
struct Semaphore {
sem_t *sem;