net: Explicitly include toolchain.h to check for endianness definitions.
This commit adds an explicit inclusion of toolchain.h from ptp_time.h. The endianness preprocessor definitions (__BYTE_ORDER__, __ORDER_LITTLE_ENDIAN__, __ORDER_BIG_ENDIAN__) are used by ptp_time.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
9b0e738e37
commit
bef377998a
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#include <net/net_core.h>
|
||||
#include <toolchain.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
Loading…
Reference in a new issue