From: Michael Ellerman Date: Wed, 4 Nov 2020 10:03:05 +0000 (+1100) Subject: selftests/memfd: Fix implicit declaration warnings X-Git-Tag: v5.11-rc1~128^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1c49e3783f8899555190a49024ac86d3d76633cd;p=thirdparty%2Flinux.git selftests/memfd: Fix implicit declaration warnings The memfd tests emit several warnings: fuse_test.c:261:7: warning: implicit declaration of function 'open' fuse_test.c:67:6: warning: implicit declaration of function 'fcntl' memfd_test.c:397:6: warning: implicit declaration of function 'fallocate' memfd_test.c:64:7: warning: implicit declaration of function 'open' memfd_test.c:90:6: warning: implicit declaration of function 'fcntl' These are all caused by the test not including fcntl.h. Instead of including linux/fcntl.h, include fcntl.h, which should eventually cause the former to be included as well. Signed-off-by: Michael Ellerman Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/memfd/fuse_test.c b/tools/testing/selftests/memfd/fuse_test.c index b018e835737df..be675002f918a 100644 --- a/tools/testing/selftests/memfd/fuse_test.c +++ b/tools/testing/selftests/memfd/fuse_test.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c index 334a7eea20042..74baab83fec35 100644 --- a/tools/testing/selftests/memfd/memfd_test.c +++ b/tools/testing/selftests/memfd/memfd_test.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include