diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2012-05-03 07:08:43 +0200 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2012-05-08 13:00:14 +0200 |
commit | 10829b2f78de91f66c7da5f7a2a2fe6d252eb38d (patch) | |
tree | 4c7a94d4143d1bff2602fd02cc21d46115ee2111 /firmware/include/file.h | |
parent | dae7a29b35db0ac4911007180389cdc0e98d5af5 (diff) | |
download | rockbox-10829b2f78de91f66c7da5f7a2a2fe6d252eb38d.tar.gz rockbox-10829b2f78de91f66c7da5f7a2a2fe6d252eb38d.zip |
Fix fat test program not compiling (FS#12646).
This changes the way creat() is wrapped around in native builds
so more experienced devs should look at it.
This patch forces to compile fat test in 32bit mode. Building
natively on x86-64 works just fine but our fat code apparently
can't deal with 64bit pointers/ints correctly.
Change-Id: I000015094f7db957ce826c22672608cd419908b0
Reviewed-on: http://gerrit.rockbox.org/228
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Diffstat (limited to 'firmware/include/file.h')
-rw-r--r-- | firmware/include/file.h | 12 |
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); | |||
82 | extern ssize_t read(int fd, void *buf, size_t count); | 82 | extern ssize_t read(int fd, void *buf, size_t count); |
83 | extern off_t lseek(int fildes, off_t offset, int whence); | 83 | extern off_t lseek(int fildes, off_t offset, int whence); |
84 | extern int file_creat(const char *pathname); | 84 | extern 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) |
87 | static 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 | |||
96 | extern ssize_t write(int fd, const void *buf, size_t count); | 94 | extern ssize_t write(int fd, const void *buf, size_t count); |
97 | extern int remove(const char* pathname); | 95 | extern int remove(const char* pathname); |
98 | extern int rename(const char* path, const char* newname); | 96 | extern int rename(const char* path, const char* newname); |