소스 검색

[bug fix]对各个libc库的termios.h增加宏定义,以防止在termios函数没有定义时,将posix_termios.h头文件引入导致报错

mysterywolf 5 년 전
부모
커밋
f13014526c
3개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      components/libc/compilers/armlibc/termios.h
  2. 2 0
      components/libc/compilers/dlib/termios.h
  3. 2 0
      components/libc/compilers/newlib/termios.h

+ 2 - 0
components/libc/compilers/armlibc/termios.h

@@ -9,7 +9,9 @@
 #ifndef _TERMIOS_H__
 #define _TERMIOS_H__
 
+#ifdef RT_USING_POSIX_TERMIOS
 #include <sys/types.h>
 #include <posix_termios.h>
+#endif
 
 #endif

+ 2 - 0
components/libc/compilers/dlib/termios.h

@@ -9,7 +9,9 @@
 #ifndef _TERMIOS_H__
 #define _TERMIOS_H__
 
+#ifdef RT_USING_POSIX_TERMIOS
 #include <sys/types.h>
 #include <posix_termios.h>
+#endif
 
 #endif

+ 2 - 0
components/libc/compilers/newlib/termios.h

@@ -9,7 +9,9 @@
 #ifndef _TERMIOS_H__
 #define _TERMIOS_H__
 
+#ifdef RT_USING_POSIX_TERMIOS
 #include <sys/types.h>
 #include <posix_termios.h>
+#endif
 
 #endif