summaryrefslogtreecommitdiff
path: root/include/libc
diff options
context:
space:
mode:
Diffstat (limited to 'include/libc')
-rw-r--r--include/libc/libc_errno.h4
-rw-r--r--include/libc/libc_fcntl.h2
-rw-r--r--include/libc/libc_fdset.h2
-rw-r--r--include/libc/libc_stat.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/include/libc/libc_errno.h b/include/libc/libc_errno.h
index 00c1f733d3..9143c841f2 100644
--- a/include/libc/libc_errno.h
+++ b/include/libc/libc_errno.h
@@ -13,7 +13,7 @@
#include <rtconfig.h>
-#if defined(RT_USING_NEWLIB) || defined(_WIN32) || defined( __GNUC__ )
+#if defined(RT_USING_NEWLIB) || defined(_WIN32) || (defined( __GNUC__ ) && !defined(__ARMCC_VERSION))
/* use errno.h file in toolchains */
#include <errno.h>
#endif
@@ -45,7 +45,7 @@ defined in armcc/errno.h
#define ERROR_BASE_NO 0
#endif
-#if !defined(RT_USING_NEWLIB) && !defined(_WIN32) && !defined(__GNUC__ )
+#if !defined(RT_USING_NEWLIB) && !defined(_WIN32) && !(defined( __GNUC__ ) && !defined(__ARMCC_VERSION))
#define EPERM (ERROR_BASE_NO + 1)
#define ENOENT (ERROR_BASE_NO + 2)
diff --git a/include/libc/libc_fcntl.h b/include/libc/libc_fcntl.h
index 39740b7d85..d149d86964 100644
--- a/include/libc/libc_fcntl.h
+++ b/include/libc/libc_fcntl.h
@@ -12,7 +12,7 @@
#ifndef LIBC_FCNTL_H__
#define LIBC_FCNTL_H__
-#if defined(RT_USING_NEWLIB) || defined(_WIN32) || defined( __GNUC__ )
+#if defined(RT_USING_NEWLIB) || defined(_WIN32) || (defined( __GNUC__ ) && !defined(__ARMCC_VERSION))
#include <fcntl.h>
#ifndef O_NONBLOCK
diff --git a/include/libc/libc_fdset.h b/include/libc/libc_fdset.h
index 4a778b51c1..9700c7e83e 100644
--- a/include/libc/libc_fdset.h
+++ b/include/libc/libc_fdset.h
@@ -13,7 +13,7 @@
#include <rtconfig.h>
-#if defined(RT_USING_NEWLIB) || defined(_WIN32) || defined( __GNUC__ )
+#if defined(RT_USING_NEWLIB) || defined(_WIN32) || (defined( __GNUC__ ) && !defined(__ARMCC_VERSION))
#include <sys/types.h>
#if defined(HAVE_SYS_SELECT_H)
#include <sys/select.h>
diff --git a/include/libc/libc_stat.h b/include/libc/libc_stat.h
index 9388688572..6497cfe12c 100644
--- a/include/libc/libc_stat.h
+++ b/include/libc/libc_stat.h
@@ -9,7 +9,7 @@
#include <rtconfig.h>
-#if defined(RT_USING_NEWLIB) || defined( __GNUC__ )
+#if defined(RT_USING_NEWLIB) || (defined( __GNUC__ ) && !defined(__ARMCC_VERSION))
/* use header file of newlib */
#include <sys/stat.h>