Skip to content

Commit 9ac5c24

Browse files
author
mutouyun
committed
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.
1 parent f7a1812 commit 9ac5c24

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/libipc/sync/semaphore.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
#include "libipc/platform/detail.h"
88
#if defined(LIBIPC_OS_WIN)
99
#include "libipc/platform/win/semaphore.h"
10-
#elif defined(LIBIPC_OS_QNX) || defined(LIBIPC_OS_FREEBSD)
11-
#elif defined(LIBIPC_OS_LINUX) || defined(LIBIPC_OS_QNX)
10+
#elif defined(LIBIPC_OS_LINUX) || defined(LIBIPC_OS_QNX) || defined(LIBIPC_OS_FREEBSD)
1211
#include "libipc/platform/posix/semaphore_impl.h"
1312
#else/*IPC_OS*/
1413
# error "Unsupported platform."

0 commit comments

Comments
 (0)