1
0
Meco Man 3 жил өмнө
parent
commit
8213bbd92e

+ 1 - 2
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>
 

+ 1 - 2
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>
 

+ 1 - 2
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>
 

+ 1 - 2
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>

+ 1 - 2
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)
 {

+ 1 - 2
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 */

+ 0 - 3
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>

+ 4 - 1
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);

+ 4 - 4
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;