From 2c2e261648d5ae1befe5c4f269a655cc06b6e1e9 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Fri, 27 Aug 2010 12:38:25 +0000 Subject: 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 --- apps/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/tree.c') 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 */ -- cgit v1.2.3