fix(platform): Add FreeBSD detection and include detect_plat.h in detail.h

Fixed two critical issues from the rebase:
1. Added LIBIPC_OS_FREEBSD macro definition in detect_plat.h to enable
   FreeBSD platform detection alongside other OS checks
2. Added missing #include "libipc/imp/detect_plat.h" in detail.h to
   properly include platform detection macros

These fixes ensure FreeBSD compilation will work correctly with the
unified platform detection system.
This commit is contained in:
mutouyun 2025-12-09 04:02:18 +00:00
parent 636d84b030
commit 32244acf08
2 changed files with 5 additions and 0 deletions

View File

@ -15,6 +15,8 @@
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || \
defined(__NT__) || defined(__MSYS__)
# define LIBIPC_OS_WIN32
#elif defined(__FreeBSD__)
# define LIBIPC_OS_FREEBSD
#elif defined(__QNX__) || defined(__QNXNTO__)
# define LIBIPC_OS_QNX
#elif defined(__APPLE__)

View File

@ -1,6 +1,8 @@
#ifndef LIBIPC_SRC_PLATFORM_DETAIL_H_
#define LIBIPC_SRC_PLATFORM_DETAIL_H_
#include "libipc/imp/detect_plat.h"
#if defined(__cplusplus)
@ -97,3 +99,4 @@ constexpr const T& (min)(const T& a, const T& b) {
#endif // defined(__cplusplus)
#endif // LIBIPC_SRC_PLATFORM_DETAIL_H_