Skip to content

Commit 2ceb3bf

Browse files
authored
Merge pull request #14935 from jeromecoutant/PR_IAR
mbed_retarget: enable IAR build
2 parents acbf352 + e61aff6 commit 2ceb3bf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

platform/include/platform/mbed_retarget.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#endif
3838
#include <errno.h>
3939

40-
#if !defined(__ARMCC_VERSION)
40+
#if !defined(__ARMCC_VERSION) && defined(__GNUC__)
4141
#include <fcntl.h>
4242
#endif
4343

@@ -468,9 +468,16 @@ typedef struct DIR_impl DIR;
468468
#ifndef ELIBEXEC
469469
#define ELIBEXEC 83 /* Cannot exec a shared library directly */
470470
#endif
471+
472+
#if defined ( __ICCARM__ )
473+
#undef EILSEQ /* defined in IAR arm/inc/c/errno.h: #define EILSEQ 36 */
474+
#define EILSEQ 84 /* Illegal byte sequence */
475+
#else
471476
#ifndef EILSEQ
472477
#define EILSEQ 84 /* Illegal byte sequence */
473478
#endif
479+
#endif
480+
474481
#ifndef ERESTART
475482
#define ERESTART 285 /* Interrupted system call should be restarted */
476483
#endif

0 commit comments

Comments
 (0)