kernel: Explicitly include toolchain.h to check for endianness definitions.
This commit adds an explicit inclusion of toolchain.h from kernel.h. The endianness preprocessor definitions (__BYTE_ORDER__, __ORDER_LITTLE_ENDIAN__, __ORDER_BIG_ENDIAN__) are used by kernel.h; these being not defined can easily go unnoticed and cause unexpected behaviours, as detailed in PR #18922. toolchain.h ensures that these preprocessor definitions are defined and *must* be included in a file that uses these definitions. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
parent
91e75075ae
commit
33fbe002d0
1 changed files with 1 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <kernel_includes.h>
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <toolchain.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue