Skip to content

Commit f69a9da

Browse files
laffer1CarterLi
andauthored
CMake: Add initial support for MidnightBSD (#1377)
* Add initial support for MidnightBSD * Cleanup some issues identified through code review. Add libzfs check as MidnightBSD does have zfs. * Add MidnightBSD check to the version.c detection * Remove `OR MidnightBSD` tests * Clean up --------- Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
1 parent 9a34cb9 commit f69a9da

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
2020
set(FreeBSD TRUE CACHE BOOL "..." FORCE)
2121
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
2222
set(OpenBSD TRUE CACHE BOOL "..." FORCE)
23+
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "MidnightBSD")
24+
set(FreeBSD TRUE CACHE BOOL "..." FORCE)
25+
set(MidnightBSD TRUE CACHE BOOL "..." FORCE)
2326
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "NetBSD")
2427
set(NetBSD TRUE CACHE BOOL "..." FORCE)
2528
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")

src/detection/version/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#define FF_SYSNAME "Linux"
2929
#elif defined(__DragonFly__) // We define `__FreeBSD__` on DragonFly BSD for simplification
3030
#define FF_SYSNAME "DragonFly"
31+
#elif defined(__MidnightBSD__)
32+
#define FF_SYSNAME "MidnightBSD"
3133
#elif defined(__FreeBSD__)
3234
#define FF_SYSNAME "FreeBSD"
3335
#elif defined(__APPLE__)

0 commit comments

Comments
 (0)