Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/landlock: Fix build of audit_test

We are hitting build error on CentOS 9:

audit_test.c:232:40: error: ‘O_CLOEXEC’ undeclared (...)

Fix this by including fcntl.h.

Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20250605214416.1885878-1-song@kernel.org
Fixes: 6b4566400a29 ("selftests/landlock: Add PID tests for audit records")
Signed-off-by: Mickaël Salaün <mic@digikod.net>

authored by

Song Liu and committed by
Mickaël Salaün
dc58130b 94a7ce26

+1
+1
tools/testing/selftests/landlock/audit_test.c
··· 7 7 8 8 #define _GNU_SOURCE 9 9 #include <errno.h> 10 + #include <fcntl.h> 10 11 #include <limits.h> 11 12 #include <linux/landlock.h> 12 13 #include <pthread.h>