summaryrefslogtreecommitdiff
path: root/firmware/include/file.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/include/file.h')
-rw-r--r--firmware/include/file.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/firmware/include/file.h b/firmware/include/file.h
index 198fccbc7b..0ff94a8168 100644
--- a/firmware/include/file.h
+++ b/firmware/include/file.h
@@ -82,17 +82,15 @@ extern int fsync(int fd);
82extern ssize_t read(int fd, void *buf, size_t count); 82extern ssize_t read(int fd, void *buf, size_t count);
83extern off_t lseek(int fildes, off_t offset, int whence); 83extern off_t lseek(int fildes, off_t offset, int whence);
84extern int file_creat(const char *pathname); 84extern int file_creat(const char *pathname);
85#if (CONFIG_PLATFORM & PLATFORM_NATIVE) && !defined(__PCTOOL__) 85#if ((CONFIG_PLATFORM & PLATFORM_NATIVE) && !defined(__PCTOOL__)) || \
86/* posix compatibility function */ 86 defined(TEST_FAT)
87static inline int creat(const char *pathname, mode_t mode) 87#define creat(x, y) file_creat(x)
88{ 88
89 (void)mode;
90 return file_creat(pathname);
91}
92#if !defined(CODEC) && !defined(PLUGIN) 89#if !defined(CODEC) && !defined(PLUGIN)
93#define open(x, y, ...) file_open(x,y) 90#define open(x, y, ...) file_open(x,y)
94#endif 91#endif
95#endif 92#endif
93
96extern ssize_t write(int fd, const void *buf, size_t count); 94extern ssize_t write(int fd, const void *buf, size_t count);
97extern int remove(const char* pathname); 95extern int remove(const char* pathname);
98extern int rename(const char* path, const char* newname); 96extern int rename(const char* path, const char* newname);