Fix build error for 64-bit target 69/65069/1 accepted/tizen/common/20160407.133034 accepted/tizen/ivi/20160407.112025 accepted/tizen/mobile/20160407.111937 accepted/tizen/tv/20160407.111951 accepted/tizen/wearable/20160407.112008 submit/tizen/20160407.075511
authorchleun.moon <chleun.moon@samsung.com>
Thu, 7 Apr 2016 06:46:40 +0000 (15:46 +0900)
committerchleun.moon <chleun.moon@samsung.com>
Thu, 7 Apr 2016 06:46:59 +0000 (15:46 +0900)
Change-Id: Ib7e7edb00e2c719cd338ef2b9aa9ab574826a4ad
Signed-off-by: cheoleun <chleun.moon@samsung.com>
src/dns-sd/dns-sd.c
src/ssdp/ssdp.c

index a4ed5eedcc1b8d6b72b6c6cb986e3605c3b63582..53f744895954fdc68f6d496da688c44fb742d4f0 100644 (file)
@@ -19,6 +19,7 @@
 #include <glib.h>
 #include <gio/gio.h>
 #include <stdio.h>
+#include <stdint.h>
 #include <string.h>
 #include <netinet/in.h>
 #include <dns_sd.h>
@@ -333,7 +334,7 @@ int dnssd_create_local_service(const char *service_type,
                return DNSSD_ERROR_OUT_OF_MEMORY;                       //LCOV_EXCL_LINE
        }
 
-       handler = (unsigned int)local_handle & 0xffffffff;
+       handler = (uintptr_t)local_handle & 0xffffffff;
        *dnssd_service = handler;
        local_handle->service_handler = handler;
        local_handle->op_type = DNSSD_TYPE_REGISTER;
@@ -987,7 +988,7 @@ static int __dnssd_getaddrinfo(dnssd_handle_s *dnssd_handle, unsigned int flags,
        found = GET_FOUND_DATA_P(local_handle);
 
        local_handle->op_type = DNSSD_TYPE_FOUND;
-       local_handle->service_handler = (unsigned int)local_handle & 0xffffffff;
+       local_handle->service_handler = (uintptr_t)local_handle & 0xffffffff;
        g_strlcpy(local_handle->domain, domain, sizeof(local_handle->domain));
        local_handle->if_index = if_index;
        local_handle->flags = flags;
@@ -1225,7 +1226,7 @@ int dnssd_start_browsing_service(const char *service_type,
                return DNSSD_ERROR_OUT_OF_MEMORY;       //LCOV_EXCL_LINE
        }
 
-       handler = (unsigned int)local_handle & 0xffffffff;
+       handler = (uintptr_t)local_handle & 0xffffffff;
        *dnssd_service = handler;
        local_handle->service_handler = handler;
        local_handle->op_type = DNSSD_TYPE_BROWSE;
index 9ad0d85b79a6664536c49f904cccaadb14ddd715..9d27e68d9c05fb46a931970a7920dfca1fd595a6 100644 (file)
@@ -21,6 +21,7 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include <stdint.h>
 
 /*****************************************************************************
  * System headers
@@ -316,7 +317,7 @@ __ssdp_res_available_cb(GSSDPResourceBrowser *resource_browser,
 
        found_service->usn = g_strdup(usn);
        found_service->url = temp_url;
-       found_service->service_handler = (unsigned int)found_service & 0xffffffff;
+       found_service->service_handler = (uintptr_t)found_service & 0xffffffff;
        found_service->browser_id = browser->service_handler;
        found_service->origin = SSDP_SERVICE_STATE_FOUND;
 
@@ -477,7 +478,7 @@ int ssdp_create_local_service(const char *target, ssdp_service_h *ssdp_service)
                return SSDP_ERROR_OUT_OF_MEMORY;        //LCOV_EXCL_LINE
        }
 
-       *ssdp_service = (unsigned int)service & 0xFFFFFFFF;
+       *ssdp_service = (uintptr_t)service & 0xFFFFFFFF;
        SSDP_LOGD("Create handler for service [%u]", *ssdp_service);
        service->service_handler = *ssdp_service;
        service->origin = SSDP_SERVICE_STATE_NOT_REGISTERED;
@@ -906,7 +907,7 @@ GLIST_ITER_END()
                }
 
                /* Create browser handle */
-               *ssdp_browser = (unsigned int)browser & 0xFFFFFFFF;
+               *ssdp_browser = (uintptr_t)browser & 0xFFFFFFFF;
                SSDP_LOGD("Create handler for browser [%u]", *ssdp_browser);
                browser->service_handler = *ssdp_browser;
 
@@ -978,7 +979,7 @@ int ssdp_stop_browsing_service(ssdp_browser_h ssdp_browser)
 
        g_hash_table_foreach(g_found_ssdp_services,
                        (GHFunc)__g_hash_remove_related_services,
-                       (gpointer)browser->service_handler);
+                       (gpointer)(uintptr_t)browser->service_handler);
 
        g_free(browser->target);
        g_free(browser);