From 3d56a8c7581f948ed37234683329c96079c8956f Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Tue, 13 Jul 2010 02:22:55 +0200 Subject: [PATCH] Fix target builds by forcing get_user_file_path() to be inline and not defining it for plugins. --- apps/paths.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/paths.h b/apps/paths.h index 5567cd69c..fcd1baa2e 100644 --- a/apps/paths.h +++ b/apps/paths.h @@ -24,6 +24,7 @@ #include #include "autoconf.h" +#include "string-extra.h" /* flags for get_user_file_path() */ /* whether you need write access to that file/dir, especially true @@ -59,25 +60,34 @@ #define ROCKBOX_DIR_LEN sizeof(ROCKBOX_DIR) #endif /* def __PCTOOL__ */ -#define ROCKBOX_DIR ROCKBOX_DIR #define PLUGIN_DIR ROCKBOX_DIR "/rocks" #define CODECS_DIR ROCKBOX_DIR "/codecs" #define REC_BASE_DIR "/" #define PLAYLIST_CATALOG_DEFAULT_DIR "/Playlists" -inline const char* get_user_file_path(const char *path, +/* +static inline const char* get_user_file_path(const char *path, + unsigned flags, + char* buf, + const size_t bufsize) + ,unused)); +*/ +#ifndef PLUGIN +static inline __attribute__((always_inline)) const char* get_user_file_path(const char *path, unsigned flags, char* buf, const size_t bufsize) { if (flags & FORCE_BUFFER_COPY) { - strlcpy(buf, path, bufsize); + strlcpy(buf, path, bufsize); + return buf; } return path; } +#endif #define paths_init() #else /* application */ -- 2.11.4.GIT