From 9ac5c242546bb33ba2b570d4cf310621f529aed7 Mon Sep 17 00:00:00 2001 From: mutouyun Date: Thu, 29 Jan 2026 03:20:25 +0000 Subject: [PATCH] fix(freebsd): include semaphore_impl.h for FreeBSD platform Fix issue #174: FreeBSD was excluded from including the POSIX semaphore implementation header. The previous conditional compilation had an empty branch for LIBIPC_OS_FREEBSD, causing 'no member named sync in namespace ipc::detail' errors. FreeBSD supports POSIX semaphore APIs (sem_open, sem_wait, sem_post, etc.), so it should use the same semaphore_impl.h as Linux and QNX. --- src/libipc/sync/semaphore.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libipc/sync/semaphore.cpp b/src/libipc/sync/semaphore.cpp index 8f1dbb7..bf09f04 100644 --- a/src/libipc/sync/semaphore.cpp +++ b/src/libipc/sync/semaphore.cpp @@ -7,8 +7,7 @@ #include "libipc/platform/detail.h" #if defined(LIBIPC_OS_WIN) #include "libipc/platform/win/semaphore.h" -#elif defined(LIBIPC_OS_QNX) || defined(LIBIPC_OS_FREEBSD) -#elif defined(LIBIPC_OS_LINUX) || defined(LIBIPC_OS_QNX) +#elif defined(LIBIPC_OS_LINUX) || defined(LIBIPC_OS_QNX) || defined(LIBIPC_OS_FREEBSD) #include "libipc/platform/posix/semaphore_impl.h" #else/*IPC_OS*/ # error "Unsupported platform."