diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c index 7182e23c37..c749897a08 100644 --- a/components/drivers/serial/serial.c +++ b/components/drivers/serial/serial.c @@ -38,9 +38,8 @@ #ifdef RT_USING_POSIX_STDIO #include +#include #include -#include -#include #include #include diff --git a/components/drivers/serial/serial_v2.c b/components/drivers/serial/serial_v2.c index 738afcb081..3e0b057df5 100644 --- a/components/drivers/serial/serial_v2.c +++ b/components/drivers/serial/serial_v2.c @@ -18,8 +18,7 @@ #ifdef RT_USING_POSIX_STDIO #include -#include -#include +#include #include #include diff --git a/components/drivers/src/pipe.c b/components/drivers/src/pipe.c index 2bc0a10083..3a2ad4104d 100644 --- a/components/drivers/src/pipe.c +++ b/components/drivers/src/pipe.c @@ -15,8 +15,7 @@ #if defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_POSIX_PIPE) #include -#include -#include +#include #include #include diff --git a/components/finsh/msh.c b/components/finsh/msh.c index abf82e992c..bb649549d4 100644 --- a/components/finsh/msh.c +++ b/components/finsh/msh.c @@ -23,8 +23,7 @@ #ifdef DFS_USING_POSIX #include #include -#include -#include +#include #endif /* DFS_USING_POSIX */ #ifdef RT_USING_MODULE #include diff --git a/components/finsh/msh_file.c b/components/finsh/msh_file.c index 28f8d4803f..9deab4f0bc 100644 --- a/components/finsh/msh_file.c +++ b/components/finsh/msh_file.c @@ -17,8 +17,7 @@ #include "msh.h" #include #include -#include -#include +#include static int msh_readline(int fd, char *line_buf, int size) { diff --git a/components/finsh/shell.c b/components/finsh/shell.c index a326ba1978..824c60392d 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -29,8 +29,7 @@ #ifdef DFS_USING_POSIX #include -#include -#include +#include #endif /* DFS_USING_POSIX */ /* finsh thread */ diff --git a/components/libc/compilers/common/sys/ioctl.h b/components/libc/compilers/common/sys/ioctl.h index 49c294eb8d..c663025c1f 100644 --- a/components/libc/compilers/common/sys/ioctl.h +++ b/components/libc/compilers/common/sys/ioctl.h @@ -12,9 +12,6 @@ #define __SYS_IOCTL_H__ #include -#include -#include -#include #ifdef _WIN32 #include diff --git a/components/libc/compilers/common/time.c b/components/libc/compilers/common/time.c index 46bb0c1355..0b34236952 100644 --- a/components/libc/compilers/common/time.c +++ b/components/libc/compilers/common/time.c @@ -25,6 +25,10 @@ #include #include #include +#include +#ifdef RT_USING_POSIX_DELAY +#include +#endif #ifdef RT_USING_RTC #include #endif @@ -489,7 +493,6 @@ RTM_EXPORT(difftime); RTM_EXPORT(strftime); #ifdef RT_USING_POSIX_DELAY -#include int nanosleep(const struct timespec *rqtp, struct timespec *rmtp) { sleep(rqtp->tv_sec); diff --git a/components/libc/posix/io/aio/aio.c b/components/libc/posix/io/aio/aio.c index bf188728f0..e12a7047c8 100644 --- a/components/libc/posix/io/aio/aio.c +++ b/components/libc/posix/io/aio/aio.c @@ -8,12 +8,12 @@ * 2017/12/30 Bernard The first version. */ -#include +#include #include +#include #include -#include -#include -#include +#include +#include #include "aio.h" struct rt_workqueue* aio_queue = NULL;