summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/plugin.c3
-rw-r--r--apps/plugin.h4
2 files changed, 6 insertions, 1 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index 6366580a56..020bf61b1a 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -33,6 +33,7 @@
#ifdef SIMULATOR
#include <dlfcn.h>
+#include <debug.h>
#define PREFIX(_x_) x11_ ## _x_
#else
#define PREFIX(_x_) _x_
@@ -118,6 +119,7 @@ static struct plugin_api rockbox_api = {
srand,
rand,
splash,
+ qsort,
};
int plugin_load(char* plugin, void* parameter)
@@ -144,6 +146,7 @@ int plugin_load(char* plugin, void* parameter)
if (!pd) {
snprintf(buf, sizeof buf, "Can't open %s", plugin);
splash(HZ*2, 0, true, buf);
+ DEBUGF("dlopen(%s): %s\n",path,dlerror());
dlclose(pd);
return -1;
}
diff --git a/apps/plugin.h b/apps/plugin.h
index 3b79edefc6..45acfaf5d7 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -37,7 +37,7 @@
#include "lcd.h"
/* increase this every time the api struct changes */
-#define PLUGIN_API_VERSION 1
+#define PLUGIN_API_VERSION 2
/* plugin return codes */
enum plugin_status {
@@ -149,6 +149,8 @@ struct plugin_api {
void (*srand)(unsigned int seed);
int (*rand)(void);
void (*splash)(int ticks, int keymask, bool center, char *fmt, ...);
+ void (*qsort)(void *base, size_t nmemb, size_t size,
+ int(*compar)(const void *, const void *));
};
/* defined by the plugin loader (plugin.c) */