Browse Source

[libc][time] 修复IAR版本判断逻辑错误

Meco Man 3 năm trước cách đây
mục cha
commit
2774343d97
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      components/libc/compilers/common/sys/time.h

+ 2 - 2
components/libc/compilers/common/sys/time.h

@@ -54,13 +54,13 @@ struct timeval
 };
 #endif /* !defined(_TIMEVAL_DEFINED) && !defined(_WIN32) */
 
-#if defined(__ARMCC_VERSION) || defined(_WIN32) || (defined(__ICCARM__) && (__VER__ >= 8010001))
+#if defined(__ARMCC_VERSION) || defined(_WIN32) || (defined(__ICCARM__) && (__VER__ < 8010001))
 struct timespec
 {
     time_t  tv_sec;     /* seconds */
     long    tv_nsec;    /* and nanoseconds */
 };
-#endif /* defined(__ARMCC_VERSION) || defined(_WIN32) || (defined(__ICCARM__) && (__VER__ >= 8010001)) */
+#endif /* defined(__ARMCC_VERSION) || defined(_WIN32) || (defined(__ICCARM__) && (__VER__ < 8010001)) */
 
 #if !(defined(__GNUC__) && !defined(__ARMCC_VERSION)/*GCC*/)
 /*