From beff27eca1ea2f92ee7d023884479f14571f119a Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Sat, 23 Nov 2024 22:29:45 +0000 Subject: [PATCH] pidfd: add missing include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix for the following error when building CRIU on Rocky Linux 8 criu/pidfd.c: In function ‘pidfd_open’: criu/pidfd.c:119:17: error: ‘__NR_pidfd_open’ undeclared (first use in this function); did you mean ‘pidfd_open’? return syscall(__NR_pidfd_open, pid, flags); ^~~~~~~~~~~~~~~ pidfd_open criu/pidfd.c:119:17: note: each undeclared identifier is reported only once for each function it appears in criu/pidfd.c:120:1: error: control reaches end of non-void function [-Werror=return-type] } ^ criu/pidfd.c: At top level: cc1: error: unrecognized command line option ‘-Wno-unknown-warning-option’ [-Werror] cc1: error: unrecognized command line option ‘-Wno-dangling-pointer’ [-Werror] cc1: all warnings being treated as errors Signed-off-by: Radostin Stoyanov --- criu/pidfd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/criu/pidfd.c b/criu/pidfd.c index 53b9bcf71a..ae32025b09 100644 --- a/criu/pidfd.c +++ b/criu/pidfd.c @@ -11,6 +11,8 @@ #include "common/bug.h" #include "rst-malloc.h" +#include "compel/plugins/std/syscall-codes.h" + #undef LOG_PREFIX #define LOG_PREFIX "pidfd: "