]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests/landlock: Fix build of audit_test
authorSong Liu <song@kernel.org>
Thu, 5 Jun 2025 21:44:16 +0000 (14:44 -0700)
committerMickaël Salaün <mic@digikod.net>
Thu, 19 Jun 2025 11:55:40 +0000 (13:55 +0200)
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>
tools/testing/selftests/landlock/audit_test.c

index cfc571afd0eb811490dce94fee46e5c7ed6b6003..46d02d49835aaefe09edd869aab76cd3fdd98eb1 100644 (file)
@@ -7,6 +7,7 @@
 
 #define _GNU_SOURCE
 #include <errno.h>
+#include <fcntl.h>
 #include <limits.h>
 #include <linux/landlock.h>
 #include <pthread.h>