Patch taken from: https://github.com/falcosecurity/libs/pull/1884 From b52aec86c96f26e14afcdece6a6ccb6ce2f0a7ec Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Thu, 30 May 2024 11:36:32 +0200 Subject: [PATCH] fix(driver): fix build of kmod on linux 6.10. Signed-off-by: Federico Di Pierro --- driver/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/driver/main.c b/driver/main.c index 1bcd600675..af1470b8d7 100644 --- a/driver/main.c +++ b/driver/main.c @@ -1649,8 +1649,10 @@ static inline int drop_nostate_event(ppm_event_code event_type, if (close_fd < 0 || close_fd >= fdt->max_fds || #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)) !FD_ISSET(close_fd, fdt->open_fds) -#else +#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0)) !fd_is_open(close_fd, fdt) +#else + !test_bit(close_fd, fdt->open_fds) #endif ) { drop = true;