From b4ada860b3f9b5811de9b4bb1de78c042e7a349e Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Tue, 28 Feb 2006 23:56:44 +0000 Subject: Allow building simulators on systems where errno is thread-local by using the system's implementation of errno.h for simulator builds. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8871 a1c6a512-1295-4272-9138-f99709370657 --- firmware/include/errno.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'firmware/include/errno.h') 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 @@ /* 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 */ -- cgit v1.2.3