summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2022-01-13 11:27:12 -0500
committerBernard Xiong <[email protected]>2022-01-14 23:09:32 +0800
commit8213bbd92ed8b9186f0c1c12a10da43a8b18ed51 (patch)
treef4fbc211506dc4d187588795ff3ea3989ed66345 /components
parent3d2e23ec1c5140c8750c71ebf37c197f6048b94e (diff)
update
Diffstat (limited to 'components')
-rw-r--r--components/drivers/serial/serial.c3
-rw-r--r--components/drivers/serial/serial_v2.c3
-rw-r--r--components/drivers/src/pipe.c3
-rw-r--r--components/finsh/msh.c3
-rw-r--r--components/finsh/msh_file.c3
-rw-r--r--components/finsh/shell.c3
-rw-r--r--components/libc/compilers/common/sys/ioctl.h3
-rw-r--r--components/libc/compilers/common/time.c5
-rw-r--r--components/libc/posix/io/aio/aio.c8
9 files changed, 14 insertions, 20 deletions
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 <dfs_file.h>
+#include <fcntl.h>
#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
#include <poll.h>
#include <sys/ioctl.h>
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 <unistd.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
+#include <fcntl.h>
#include <poll.h>
#include <sys/ioctl.h>
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 <unistd.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
+#include <fcntl.h>
#include <poll.h>
#include <sys/ioctl.h>
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 <dfs_file.h>
#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
+#include <fcntl.h>
#endif /* DFS_USING_POSIX */
#ifdef RT_USING_MODULE
#include <dlmodule.h>
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 <dfs_file.h>
#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
+#include <fcntl.h>
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 <unistd.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
+#include <fcntl.h>
#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 <rtconfig.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
#ifdef _WIN32
#include <winsock.h>
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 <sys/errno.h>
#include <rtthread.h>
#include <rthw.h>
+#include <unistd.h>
+#ifdef RT_USING_POSIX_DELAY
+#include <delay.h>
+#endif
#ifdef RT_USING_RTC
#include <rtdevice.h>
#endif
@@ -489,7 +493,6 @@ RTM_EXPORT(difftime);
RTM_EXPORT(strftime);
#ifdef RT_USING_POSIX_DELAY
-#include <delay.h>
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 <stdint.h>
+#include <rtthread.h>
#include <rthw.h>
+#include <stdint.h>
#include <unistd.h>
-#include <dfs_file.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
+#include <fcntl.h>
+#include <sys/errno.h>
#include "aio.h"
struct rt_workqueue* aio_queue = NULL;