-
-
Notifications
You must be signed in to change notification settings - Fork 599
Add initial support for MidnightBSD #1377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Does GCC on MidnightBSD define diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc33bf5b..e3481ec0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,6 +25,9 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "NetBSD")
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")
set(FreeBSD TRUE CACHE BOOL "..." FORCE)
set(DragonFly TRUE CACHE BOOL "..." FORCE)
+elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "MidnightBSD")
+ set(FreeBSD TRUE CACHE BOOL "..." FORCE)
+ set(MidnightBSD TRUE CACHE BOOL "..." FORCE)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
set(SunOS TRUE CACHE BOOL "..." FORCE)
elseif(NOT APPLE AND NOT WIN32) |
|
Does GCC define |
| endif() | ||
| if(FreeBSD AND EXISTS "/usr/local/bin/objdump") | ||
| if((FreeBSD OR MidnightBSD) AND EXISTS "/usr/local/bin/objdump") | ||
| execute_process(COMMAND /bin/sh -c "/usr/local/bin/objdump -T /lib/libc.so.* | grep 'FBSD_[0-9][0-9]*\\.[0-9][0-9]*' -o | sort -Vru | head -1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does MidnightBSD use FreeBSD libc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MidnightBSD uses FreeBSD libc with some additions. So there are FBSD symbol versions and also MBSD versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess using MBSD versions is better.
|
MidnightBSD defines both |
Add libzfs check as MidnightBSD does have zfs.
|
If you use |
diff --git a/src/detection/version/version.c b/src/detection/version/version.c
index 8b230eec..1f1deb34 100644
--- a/src/detection/version/version.c
+++ b/src/detection/version/version.c
@@ -28,6 +28,8 @@
#define FF_SYSNAME "Linux"
#elif defined(__DragonFly__) // We define `__FreeBSD__` on DragonFly BSD for simplification
#define FF_SYSNAME "DragonFly"
+#elif defined(__MidnightBSD__)
+ #define FF_SYSNAME "MidnightBSD"
#elif defined(__FreeBSD__)
#define FF_SYSNAME "FreeBSD"
#elif defined(__APPLE__) |
This build works on MidnightBSD 3.2.1+ (stable/3.2 branch or current)