summaryrefslogtreecommitdiffstats
path: root/apps/tree.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-08-27 12:38:25 +0000
committerThomas Martitz <kugel@rockbox.org>2010-08-27 12:38:25 +0000
commit2c2e261648d5ae1befe5c4f269a655cc06b6e1e9 (patch)
tree16ea536a547deb252276c29d34eeee08f029866f /apps/tree.c
parent79798ff5f30dea7419f360e197763abb3b46259a (diff)
downloadrockbox-2c2e261648d5ae1befe5c4f269a655cc06b6e1e9.tar.gz
rockbox-2c2e261648d5ae1befe5c4f269a655cc06b6e1e9.tar.bz2
rockbox-2c2e261648d5ae1befe5c4f269a655cc06b6e1e9.zip
Use system headers a bit more: use host's fcntl.h for O_RDONLY etc.
Removes the need to fix up those in the simulator. Also work around some posix-mingw incompatibilities (e.g. getcwd()). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27904 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 4d915ca3b8..730c59f611 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -511,13 +511,13 @@ void resume_directory(const char *dir)
/* Returns the current working directory and also writes cwd to buf if
non-NULL. In case of error, returns NULL. */
-char *getcwd(char *buf, size_t size)
+char *getcwd(char *buf, getcwd_size_t size)
{
if (!buf)
return tc.currdir;
else if (size)
{
- if (strlcpy(buf, tc.currdir, size) < size)
+ if ((getcwd_size_t)strlcpy(buf, tc.currdir, size) < size)
return buf;
}
/* size == 0, or truncation in strlcpy */