return;
}
- headed_plugin_info->handle_headed = dlopen(HEADED_PLUGIN_FILEPATH, RTLD_NOW);
+ /* check ARCH 64 or 32*/
+ if (!access(FILEPATH_ARCH_64, 0)) {
+ BT_INFO("plugin loading for ARCH 64");
+ headed_plugin_info->handle_headed = dlopen(HEADED_PLUGIN_FILEPATH64, RTLD_NOW);
+ } else {
+ BT_INFO("plugin loading for ARCH 32");
+ headed_plugin_info->handle_headed = dlopen(HEADED_PLUGIN_FILEPATH, RTLD_NOW);
+ }
+
if (!headed_plugin_info->handle_headed) {
- BT_ERR("Can not load %s: %s", HEADED_PLUGIN_FILEPATH, dlerror());
+ BT_ERR("Can not load plugin %s", dlerror());
headed_plugin_info->plugin_headed_enabled = FALSE;
return;
}
#define BT_LE_ADV_SCAN_RSP 0x04
#define HEADED_PLUGIN_FILEPATH "/usr/lib/bt-plugin-headed.so"
+#define HEADED_PLUGIN_FILEPATH64 "/usr/lib64/bt-plugin-headed.so"
+#define FILEPATH_ARCH_64 "/usr/lib64"
/* Profile states matched to btd_service_state_t of bluez service.h */
typedef enum {