summaryrefslogtreecommitdiff
path: root/components/dfs/include
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-11-10 16:58:07 +0800
committerBernard Xiong <[email protected]>2018-11-10 16:58:07 +0800
commite108dfe4a521355c454cf4d61b4297840264080b (patch)
treee416b6f1a80ff3245148e3ac27983a888854ec5f /components/dfs/include
parentb69baa965809420fc3fcd19dd55fc1126a68c08d (diff)
[libc] Fix the _EXFUN issue in newlib
Diffstat (limited to 'components/dfs/include')
-rw-r--r--components/dfs/include/dfs_posix.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/dfs/include/dfs_posix.h b/components/dfs/include/dfs_posix.h
index 79607fc8b4..bc8ff1c698 100644
--- a/components/dfs/include/dfs_posix.h
+++ b/components/dfs/include/dfs_posix.h
@@ -41,13 +41,15 @@ int closedir(DIR* d);
/* file api*/
int open(const char *file, int flags, ...);
int close(int d);
-#ifdef RT_USING_NEWLIB
+
+#if defined(RT_USING_NEWLIB) && defined(_EXFUN)
_READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte));
_READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte));
#else
int read(int fd, void *buf, size_t len);
int write(int fd, const void *buf, size_t len);
#endif
+
off_t lseek(int fd, off_t offset, int whence);
int rename(const char *from, const char *to);
int unlink(const char *pathname);