halapi: Add support of RISC-V architecture type
[platform/hal/api/common.git] / src / hal-api-conf.c
index d86f03a..791ed29 100644 (file)
@@ -19,9 +19,6 @@
 #include <gio/gio.h>
 #include <glib-object.h>
 
-#include <json-c/json.h>
-#include <json-c/arraylist.h>
-
 #include "hal-common.h"
 #include "hal-common-interface.h"
 
@@ -52,7 +49,6 @@ do { \
                SAFE_FREE_AND_NULL(info->library_name);
                SAFE_FREE_AND_NULL(info->library_name_64bit);
                SAFE_FREE_AND_NULL(info->symbol_name);
-               SAFE_FREE_AND_NULL(info->abi_versions);
                SAFE_FREE_AND_NULL(info);
        }
 }
@@ -66,13 +62,9 @@ static struct __hal_module_info* _get_module_info_with_library_name(enum hal_mod
                                                                const char *library_name)
 {
        struct __hal_module_info *info = NULL, *new_info = NULL, *tmp_info = NULL;
-       json_object *module_array_object = NULL;
-       const char *group_name = NULL;
-       const char *module_name = NULL;
        char *library_name_prefix = NULL;
-       int ret;
 
-       if (!_module_hash | !library_name)
+       if (!_module_hash || !library_name)
                return NULL;
 
        tmp_info = _get_module_info(module);
@@ -123,7 +115,7 @@ static struct __hal_module_info* _get_module_info_with_library_name(enum hal_mod
        new_info->module = info->module;
        new_info->license = info->license;
        new_info->module_name = g_strdup(info->module_name);
-#if defined(__aarch64__)
+#if defined(__aarch64__) || defined(__x86_64__) || defined(__riscv)
        new_info->library_name_64bit = g_strdup_printf("/hal/lib64/%s", library_name);
 #else
        new_info->library_name = g_strdup_printf("/hal/lib/%s", library_name);