Skip to content

Commit

Permalink
[1.8.2][CentOS 7] Missing #include <linux/sched.h>
Browse files Browse the repository at this point in the history
The newly introduced `src/libcrun/scheduler.c` by
containers#1166 missing `#include
<linux/sched.h>` for CentOS 7, which result with missing
`SCHED_DEADLINE`.

Moreover, for CentOS 7 build we also need to enable `-std=c99`, or
upgrade build tools to gcc 11 with `. /opt/rh/devtoolset-11/enable`
before build.

See https://stackoverflow.com/a/50085457
See https://github.com/alvistack/containers-crun/blob/alvistack/1.8.2/crun.spec

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
  • Loading branch information
hswong3i committed Mar 23, 2023
1 parent 3437b64 commit 5855e70
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libcrun/scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "linux.h"
#include "utils.h"
#include <sched.h>
#include <linux/sched.h>
#include <sys/sysmacros.h>
#include <limits.h>
#include <inttypes.h>
Expand Down

0 comments on commit 5855e70

Please sign in to comment.