summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/hosted/filesystem-app.c6
-rwxr-xr-xtools/configure2
-rw-r--r--tools/database/database.c35
3 files changed, 8 insertions, 35 deletions
diff --git a/firmware/target/hosted/filesystem-app.c b/firmware/target/hosted/filesystem-app.c
index 9c2ff8c99b..cfe4e65fe9 100644
--- a/firmware/target/hosted/filesystem-app.c
+++ b/firmware/target/hosted/filesystem-app.c
@@ -43,6 +43,10 @@
43#undef PIVOT_ROOT 43#undef PIVOT_ROOT
44#endif 44#endif
45 45
46#if defined(DBTOOL)
47#define PIVOT_ROOT "."
48#endif
49
46#if defined(__PCTOOL__) 50#if defined(__PCTOOL__)
47/* We don't want this for tools */ 51/* We don't want this for tools */
48#undef HAVE_SPECIAL_DIRS 52#undef HAVE_SPECIAL_DIRS
@@ -222,7 +226,7 @@ const char * handle_special_dirs(const char *dir, unsigned flags,
222#define PIVOT_ROOT_LEN (sizeof(PIVOT_ROOT)-1) 226#define PIVOT_ROOT_LEN (sizeof(PIVOT_ROOT)-1)
223 /* Prepend root prefix to find actual path */ 227 /* Prepend root prefix to find actual path */
224 if (strncmp(PIVOT_ROOT, dir, PIVOT_ROOT_LEN) 228 if (strncmp(PIVOT_ROOT, dir, PIVOT_ROOT_LEN)
225#ifdef MULTIDRIVE_DIR 229#if defined(MULTIDRIVE_DIR) && defined(MULTIDRIVE_DIR_LEN)
226 /* Unless it's a MULTIDRIVE dir, in which case use as-is */ 230 /* Unless it's a MULTIDRIVE dir, in which case use as-is */
227 && strncmp(MULTIDRIVE_DIR, dir, MULTIDRIVE_DIR_LEN) 231 && strncmp(MULTIDRIVE_DIR, dir, MULTIDRIVE_DIR_LEN)
228#endif 232#endif
diff --git a/tools/configure b/tools/configure
index 64b238bb6d..1f758a967d 100755
--- a/tools/configure
+++ b/tools/configure
@@ -4270,7 +4270,7 @@ fi
4270 simcc "database-sdl" 4270 simcc "database-sdl"
4271 toolset=''; 4271 toolset='';
4272 appsdir='$(ROOTDIR)/tools/database'; 4272 appsdir='$(ROOTDIR)/tools/database';
4273 rbdir="./.rockbox" 4273
4274 case $uname in 4274 case $uname in
4275 CYGWIN*|MINGW*) 4275 CYGWIN*|MINGW*)
4276 output="database_${modelname}.exe" 4276 output="database_${modelname}.exe"
diff --git a/tools/database/database.c b/tools/database/database.c
index 713d379c41..6eab245f65 100644
--- a/tools/database/database.c
+++ b/tools/database/database.c
@@ -23,41 +23,10 @@ int main(int argc, char **argv)
23 23
24 /* / is actually ., will get translated in io.c 24 /* / is actually ., will get translated in io.c
25 * (with the help of sim_root_dir below */ 25 * (with the help of sim_root_dir below */
26 const char *paths[] = { "./", NULL }; 26 const char *paths[] = { "/", NULL };
27 tagcache_init(); 27 tagcache_init();
28 do_tagcache_build(paths); 28 do_tagcache_build(paths);
29 tagcache_reverse_scan(); 29 tagcache_reverse_scan();
30 30
31 return 0; 31 return 0;
32} 32}
33
34/* needed for io.c */
35const char *sim_root_dir = ".";
36
37/* stubs to avoid including thread-sdl.c */
38#include "kernel.h"
39void mutex_init(struct mutex *m)
40{
41 (void)m;
42}
43
44void mutex_lock(struct mutex *m)
45{
46 (void)m;
47}
48
49void mutex_unlock(struct mutex *m)
50{
51 (void)m;
52}
53
54void sim_thread_lock(void *me)
55{
56 (void)me;
57}
58
59void * sim_thread_unlock(void)
60{
61 return (void*)1;
62}
63