Skip to content

Commit 78992a4

Browse files
committed
retarget: Added include errno.h
Unfortunately, some toolchains don't define the same errno codes that are used fairly consistently on Linux based platforms, which means they also don't match the errno codes used in the retarget layer. If a user includes errno.h after mbed.h, the errno codes can be redefined incorrectly. Adding an include of errno.h in mbed.h forces the order to be fixed.
1 parent 5efda4b commit 78992a4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

platform/mbed_retarget.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#endif //__cplusplus
2727
#include <stdint.h>
2828
#include <stddef.h>
29+
#include <errno.h>
2930

3031
/* We can get the following standard types from sys/types for gcc, but we
3132
* need to define the types ourselves for the other compilers that normally

0 commit comments

Comments
 (0)