Skip to content

Commit

Permalink
pidfd: add missing include
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rst0git authored and avagin committed Dec 4, 2024
1 parent 1452c76 commit beff27e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions criu/pidfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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: "

Expand Down

0 comments on commit beff27e

Please sign in to comment.