From 924de6d1eabacce7e3b1917d9f34afb51fffeccd Mon Sep 17 00:00:00 2001 From: BernardXiong Date: Thu, 30 Dec 2021 22:37:07 +0800 Subject: [PATCH] [TTY] fix posix_termios.h issue in serial.c --- components/drivers/serial/serial.c | 3 --- components/drivers/tty/SConscript | 7 +++---- components/drivers/tty/tty.c | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c index e8e0e17a55..eaab586888 100644 --- a/components/drivers/serial/serial.c +++ b/components/drivers/serial/serial.c @@ -38,9 +38,6 @@ #include #include -#include - - /* it's possible the 'getc/putc' is defined by stdio.h in gcc/newlib. */ #ifdef getc #undef getc diff --git a/components/drivers/tty/SConscript b/components/drivers/tty/SConscript index 34e8aaccad..3c561f4e46 100644 --- a/components/drivers/tty/SConscript +++ b/components/drivers/tty/SConscript @@ -4,8 +4,7 @@ from building import * src = Glob('*.c') cwd = GetCurrentDir() CPPPATH = [cwd + "/include"] -group = [] -if GetDepend('RT_USING_LWP'): - group = DefineGroup('tty', src, depend = ['RT_USING_TTY'], CPPPATH = CPPPATH) - + +group = DefineGroup('tty', src, depend = ['RT_USING_LWP', 'RT_USING_TTY'], CPPPATH = CPPPATH) + Return('group') diff --git a/components/drivers/tty/tty.c b/components/drivers/tty/tty.c index 7bd3c3c640..b88a4b700f 100644 --- a/components/drivers/tty/tty.c +++ b/components/drivers/tty/tty.c @@ -14,6 +14,7 @@ #include #include #include + #if defined(RT_USING_POSIX) #include #endif -- Gitee