summaryrefslogtreecommitdiffstats
path: root/src/detection/libc/libc_bsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/detection/libc/libc_bsd.c')
-rw-r--r--src/detection/libc/libc_bsd.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/detection/libc/libc_bsd.c b/src/detection/libc/libc_bsd.c
new file mode 100644
index 0000000..bd73165
--- /dev/null
+++ b/src/detection/libc/libc_bsd.c
@@ -0,0 +1,20 @@
+#include "libc.h"
+
+const char* ffDetectLibc(FFLibcResult* result) {
+ result->name = "Unknown";
+ result->version = NULL;
+
+#ifdef __DragonFly__ // We define `__FreeBSD__` on DragonFly BSD for simplification
+ result->name = "DF";
+ #ifdef FF_DF_VERSION
+ result->version = FF_DF_VERSION;
+ #endif
+#elif __FreeBSD__
+ result->name = "FBSD";
+ #ifdef FF_FBSD_VERSION
+ result->version = FF_FBSD_VERSION;
+ #endif
+#endif
+
+ return NULL;
+}