diff options
author | Amer Al Shanawany <amer.shanawany@gmail.com> | 2024-04-22 16:16:59 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-05-09 01:48:13 +0300 |
commit | 051f2226a545a07b5d21b5c9d8626ddd483c68a5 (patch) | |
tree | c237b343a0c7a8e1b0eb2399b7354030924108c5 /tools/testing/selftests/filesystems/statmount/statmount_test.c | |
parent | 17909476d631979927109187cc7e89e4577ff5be (diff) | |
download | linux-051f2226a545a07b5d21b5c9d8626ddd483c68a5.tar.xz |
selftests: filesystems: add missing stddef header
fix compiler warning and errors when compiling statmount test.
gcc 12.3 (Ubuntu 12.3.0-1ubuntu1~22.04)
statmount_test.c:572:24: warning: implicit declaration of function
‘offsetof’ [-Wimplicit-function-declaration]
572 | #define str_off(memb) (offsetof(struct statmount, memb) /
sizeof(uint32_t))
| ^~~~~~~~
statmount_test.c:598:51: note: in expansion of macro ‘str_off’
598 | test_statmount_string(STATMOUNT_MNT_ROOT,
str_off(mnt_root), "mount root");
|
^~~~~~~
statmount_test.c:18:1: note: ‘offsetof’ is defined in header
‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
17 | #include "../../kselftest.h"
+++ |+#include <stddef.h>
Signed-off-by: Amer Al Shanawany <amer.shanawany@gmail.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/filesystems/statmount/statmount_test.c')
-rw-r--r-- | tools/testing/selftests/filesystems/statmount/statmount_test.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/filesystems/statmount/statmount_test.c b/tools/testing/selftests/filesystems/statmount/statmount_test.c index 3eafd7da58e2..e6d7c4f1c85b 100644 --- a/tools/testing/selftests/filesystems/statmount/statmount_test.c +++ b/tools/testing/selftests/filesystems/statmount/statmount_test.c @@ -3,6 +3,7 @@ #define _GNU_SOURCE #include <assert.h> +#include <stddef.h> #include <stdint.h> #include <sched.h> #include <fcntl.h> |