diff options
author | Miguel Ojeda <ojeda@kernel.org> | 2023-07-18 07:27:46 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2023-07-18 15:38:13 -0600 |
commit | df3cb7ac0edcc9c850799ae1c7a9cb33e95f834d (patch) | |
tree | b43b182f7f0b7bc00505bf71ca19c3aaaf6aaa69 /rust/kernel | |
parent | 1b0975ee3bdd3eb19a47371c26fd7ef8f7f6b599 (diff) |
kunit: test-bug.h: include `stddef.h` for `NULL`
The header uses `NULL` in both `CONFIG_KUNIT=y` and `=n` cases,
but does not include it explicitly.
When `CONFIG_KUNIT=y`, the header is already getting included via
the other headers, so it is not a problem for users.
However, when `CONFIG_KUNIT=n`, it is not, and thus a user could hit
a build error when including `kunit/test-bug.h`, like we are doing
later in this series [1].
Thus include `linux/stddef.h`, and do so outside the `#if`, since it
is used in both cases.
Reported-by: Boqun Feng <boqun.feng@gmail.com>
Closes: https://lore.kernel.org/rust-for-linux/ZJ8cNUW3oR2p+gL1@boqun-archlinux/ [1]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'rust/kernel')
0 files changed, 0 insertions, 0 deletions