#include <dlfcn.h>
#include <vconf.h>
-#include <sqlite3.h>
#include <glib.h>
#include <unzip.h>
return strdup(type);
}
-static const char *__get_library_path(const char *pkg_type)
+static void __get_library_path(const char *pkg_type, const char **path)
{
char buf[64];
- const char *path;
snprintf(buf, sizeof(buf), "package-manager/backendlib/lib%s.so",
pkg_type);
- path = tzplatform_mkpath(TZ_SYS_RO_ETC, buf);
- return path;
+ *path = tzplatform_mkpath(TZ_SYS_RO_ETC, buf);
}
API pkg_plugin_set *__load_library(const char *pkg_type)
bool (*on_load)(pkg_plugin_set *plugin);
const char *library_path;
- library_path = __get_library_path(pkg_type);
+ __get_library_path(pkg_type, &library_path);
if (library_path == NULL) {
_LOGE("cannot get library path for %s", pkg_type);
return NULL;