From 464e8aaff4704166aee07cbf140c43bc9b227121 Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Sun, 21 Jan 2024 15:03:29 +0100 Subject: [PATCH] util: Allow kcmp on FreeBSD FreeBSD now have kcmp(2) syscall, use it. Signed-off-by: Emmanuel Vadot Part-of: --- src/util/os_file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/os_file.c b/src/util/os_file.c index 464425a9b87..bf99463effb 100644 --- a/src/util/os_file.c +++ b/src/util/os_file.c @@ -194,13 +194,15 @@ os_read_file(const char *filename, size_t *size) return buf; } -#if DETECT_OS_LINUX && ALLOW_KCMP +#if (DETECT_OS_LINUX || DETECT_OS_FREEBSD) && ALLOW_KCMP #include #include +#if DETECT_OS_LINUX /* copied from */ #define KCMP_FILE 0 +#endif #endif