|
|
@@ -16,7 +16,11 @@
|
|
|
* void seekdir(DIR *d, off_t offset); 设置下次读取目录的位置
|
|
|
*/
|
|
|
#include <rtthread.h>
|
|
|
-#include <dfs_posix.h> /* 当需要使用文件操作时,需要包含这个头文件 */
|
|
|
+#if RT_VER_NUM >= 0x40100
|
|
|
+#include <fcntl.h> /* 当需要使用文件操作时,需要包含这个头文件 */
|
|
|
+#else
|
|
|
+#include <dfs_posix.h>
|
|
|
+#endif /*RT_VER_NUM >= 0x40100*/
|
|
|
|
|
|
/* 假设文件操作是在一个线程中完成 */
|
|
|
static void telldir_sample(void)
|