[PATCH v2 05/13] selftests/filesystems: anon_inode_test: Fix build warning

Guenter Roeck posted 13 patches 1 week, 6 days ago
[PATCH v2 05/13] selftests/filesystems: anon_inode_test: Fix build warning
Posted by Guenter Roeck 1 week, 6 days ago
Fix

anon_inode_test.c:45:12: warning: call to undeclared function 'execveat'

by adding the missing include file.

Fixes: f8ca403ae77cb ("selftests/filesystems: add exec() test for anonymous inodes")
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
v2: Update subject and description to reflect that the patch fixes a build
    warning.
    This patch does not fix:
	anon_inode_test.c: In function ‘anon_inode_no_exec’:
	anon_inode_test.c:46:19: warning: argument 3 null where non-null expected
    because I have no idea how to do avoid that warning.

 tools/testing/selftests/filesystems/anon_inode_test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/filesystems/anon_inode_test.c b/tools/testing/selftests/filesystems/anon_inode_test.c
index 73e0a4d4fb2f..5ddcfd2927f9 100644
--- a/tools/testing/selftests/filesystems/anon_inode_test.c
+++ b/tools/testing/selftests/filesystems/anon_inode_test.c
@@ -4,6 +4,7 @@
 
 #include <fcntl.h>
 #include <stdio.h>
+#include <unistd.h>
 #include <sys/stat.h>
 
 #include "../kselftest_harness.h"
-- 
2.45.2