diff options
Diffstat (limited to 'firmware/include')
| -rw-r--r-- | firmware/include/errno.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/include/errno.h b/firmware/include/errno.h index 4162f6a..1843b56 100644 --- a/firmware/include/errno.h +++ b/firmware/include/errno.h @@ -1,6 +1,12 @@ /* errno is not a global variable, because that would make using it non-reentrant. Instead, its address is returned by the function __errno. */ + +#if defined(SIMULATOR) && !defined(__MINGW32__) && !defined(__CYGWIN__) + +#include "/usr/include/errno.h" /* use the host system implementation */ + +#else /* use our own implementation */ #ifndef _SYS_ERRNO_H_ @@ -132,3 +138,4 @@ extern int errno; #define __ELASTERROR 2000 /* Users can add values starting here */ #endif /* _SYS_ERRNO_H */ +#endif /* !SIMULATOR */ |