summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/SOURCES2
-rw-r--r--firmware/include/errno.h7
2 files changed, 9 insertions, 0 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 23c3a6dddc..7ebfba38e1 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -14,7 +14,9 @@ common/file.c
14common/dircache.c 14common/dircache.c
15#endif 15#endif
16common/disk.c 16common/disk.c
17#if !defined(SIMULATOR) || defined(__MINGW32__) || defined(__CYGWIN__)
17common/errno.c 18common/errno.c
19#endif
18common/memcmp.c 20common/memcmp.c
19common/memchr.c 21common/memchr.c
20common/qsort.c 22common/qsort.c
diff --git a/firmware/include/errno.h b/firmware/include/errno.h
index 4162f6a9ed..1843b56f1d 100644
--- a/firmware/include/errno.h
+++ b/firmware/include/errno.h
@@ -1,6 +1,12 @@
1/* errno is not a global variable, because that would make using it 1/* errno is not a global variable, because that would make using it
2 non-reentrant. Instead, its address is returned by the function 2 non-reentrant. Instead, its address is returned by the function
3 __errno. */ 3 __errno. */
4
5#if defined(SIMULATOR) && !defined(__MINGW32__) && !defined(__CYGWIN__)
6
7#include "/usr/include/errno.h" /* use the host system implementation */
8
9#else /* use our own implementation */
4 10
5#ifndef _SYS_ERRNO_H_ 11#ifndef _SYS_ERRNO_H_
6 12
@@ -132,3 +138,4 @@ extern int errno;
132#define __ELASTERROR 2000 /* Users can add values starting here */ 138#define __ELASTERROR 2000 /* Users can add values starting here */
133 139
134#endif /* _SYS_ERRNO_H */ 140#endif /* _SYS_ERRNO_H */
141#endif /* !SIMULATOR */