Fix compatibility for x64 arch.
[platform/core/system/sync-agent.git] / src / framework / engine-controller / task_info_pool.c
index 7a36418..6ea27dc 100755 (executable)
@@ -20,7 +20,7 @@
 #include "engine-controller/task_info_pool.h"
 #include "engine-controller/queuing_rule_spec.h"
 #include "engine-controller/task_spec_internal.h"
-
+#include <stdint.h>
 #ifndef SYNC_AGENT_LOG
 #undef LOG_TAG
 #define LOG_TAG "AF_EC"
@@ -200,14 +200,14 @@ sync_agent_ec_boolean ec_task_info_pool_add_task_info(ec_task_info_pool_t * task
 
        GHashTable *hash = task_info_pool->task_info_pool;
        if (replace) {
-               g_hash_table_replace(hash, (gpointer) (task_info->task_spec_id), task_info);    /* TODO : check free well done */
+               g_hash_table_replace(hash, (gpointer) ((intptr_t)(task_info->task_spec_id)), task_info);        /* TODO : check free well done */
                success = true;
        } else {
-               gpointer tmp = g_hash_table_lookup(hash, (gpointer) (task_info->task_spec_id));
+               gpointer tmp = g_hash_table_lookup(hash, (gpointer) ((intptr_t)(task_info->task_spec_id)));
                if (tmp != NULL) {
                        success = false;
                } else {
-                       g_hash_table_insert(hash, (gpointer) (task_info->task_spec_id), task_info);
+                       g_hash_table_insert(hash, (gpointer) ((intptr_t)(task_info->task_spec_id)), task_info);
                }
        }
 
@@ -234,7 +234,7 @@ ec_task_info_t *ec_task_info_pool_search_task_info(ec_task_info_pool_t * task_in
        GHashTable *hash = task_info_pool->task_info_pool;
        ec_task_info_t *task_info = NULL;
 
-       task_info = (ec_task_info_t *) g_hash_table_lookup(hash, (gpointer) msg_type);
+       task_info = (ec_task_info_t *) g_hash_table_lookup(hash, (gpointer) ((intptr_t)msg_type));
 
        _EXTERN_FUNC_EXIT;