Fix build on ARM64 28/110728/1
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Tue, 20 Dec 2016 13:23:21 +0000 (16:23 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Tue, 17 Jan 2017 13:05:13 +0000 (16:05 +0300)
Change-Id: If4f5c7788fbbbe204bda7e5f5a5ed8e9058c3f61
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
daemon/cpp/common.h
daemon/cpp/features/feature_nsp.cpp
daemon/da_protocol.c
daemon/da_protocol.h
daemon/daemon.c
daemon/input_events.c
daemon/sys_stat.c
packaging/swap-manager.spec

index 4c2313b..19a5d62 100644 (file)
@@ -42,7 +42,7 @@ static inline std::string int2str(int val)
         return ss.str();
 }
 
-static inline std::string addr2hex(unsigned long val)
+static inline std::string addr2hex(uint64_t val)
 {
     std::stringstream ss;
     ss << std::hex << val;
index b8d01c6..65546c3 100644 (file)
@@ -110,7 +110,7 @@ static int nspDisable()
 
 static int initLibAppCore()
 {
-    uint32_t appcoreInitAddr = ADDR_APPCORE_INIT ?
+    uint64_t appcoreInitAddr = ADDR_APPCORE_INIT ?
                                ADDR_APPCORE_INIT :
                                Elf::plt(PATH_LIBAPPCORE_EFL, "appcore_init");
     if (appcoreInitAddr == 0) {
@@ -118,7 +118,7 @@ static int initLibAppCore()
         return -EINVAL;
     }
 
-    uint32_t elmRunAddr = ADDR_ELM_RUN_PLT ?
+    uint64_t elmRunAddr = ADDR_ELM_RUN_PLT ?
                             ADDR_ELM_RUN_PLT :
                             Elf::plt(PATH_LIBCAPI_APPFW_APPLICATION, "elm_run");
 
@@ -148,7 +148,7 @@ static int initLibAppCore()
 
 static int initLpad()
 {
-    uint32_t dlopenAddr = ADDR_DLOPEN_PLT_LPAD ?
+    uint64_t dlopenAddr = ADDR_DLOPEN_PLT_LPAD ?
                             ADDR_DLOPEN_PLT_LPAD :
                             Elf::plt(PATH_LAUNCHPAD, "dlopen");
 
@@ -157,7 +157,7 @@ static int initLpad()
         return -EINVAL;
     }
 
-    uint32_t dlsymAddr = ADDR_DLSYM_PLT_LPAD ?
+    uint64_t dlsymAddr = ADDR_DLSYM_PLT_LPAD ?
                             ADDR_DLSYM_PLT_LPAD :
                             Elf::plt(PATH_LAUNCHPAD, "dlsym");
 
index 5551b7f..d811c03 100644 (file)
@@ -628,8 +628,8 @@ int sendACKToHost(enum HostMessageT resp, enum ErrorCode err_code,
        if (payload != NULL && payload_size != 0)
                memcpy(p, payload, payload_size);
 
-       LOGI("ACK (%s) errcode<%s> payload=0x%08X; size=%d\n", msg_ID_str(resp),
-                       msgErrStr(err_code), (int)payload, payload_size);
+       LOGI("ACK (%s) errcode<%s> payload=%p; size=%d\n", msg_ID_str(resp),
+                       msgErrStr(err_code), payload, payload_size);
        printBuf((char *)msg, loglen);
 
        /* TODO FIXME What the hell is going around? This shouldn't be this way */
index e2324be..b464dbc 100644 (file)
@@ -457,7 +457,7 @@ struct recorded_event_t {
 
 #define pack_path_with_len(to, n)              \
        do {                                    \
-               size_t len;                     \
+               uint32_t len;                   \
                len = strnlen(n, PATH_MAX) + 1; \
                pack_int32(to, len);            \
                memcpy(to, n, len);             \
index fe2dfe1..b97388b 100644 (file)
@@ -798,7 +798,7 @@ static int targetServerHandler(bool is_probe_sock)
        if (err == 0) {
                /* send config message to target process */
                log.type = APP_MSG_CONFIG;
-               log.length = snprintf(log.data, sizeof(log.data), "%llu",
+               log.length = snprintf(log.data, sizeof(log.data), "%" PRIu64,
                                      prof_session.conf.use_features0) + 1;
                if (target_send_msg(target, &log) != 0)
                        LOGE("fail to send data to target %p\n", target);
index 39ec73d..f696e57 100644 (file)
@@ -312,8 +312,8 @@ static void _device_write(input_dev dev[], struct input_event *in_ev)
        for (i = 0; dev[i].fd != ARRAY_END; i++) {
                if (dev[i].fd >= 0) {
                        write(dev[i].fd, in_ev, sizeof(struct input_event));
-                       LOGI("write(%d, %d, %d)\n",
-                            dev[i].fd, (int)in_ev, sizeof(struct input_event));
+                       LOGI("write(%d, %p, %d)\n",
+                            dev[i].fd, in_ev, sizeof(struct input_event));
                }
        }
 }
index 41b9e94..0747c72 100644 (file)
@@ -2097,7 +2097,7 @@ static uint64_t read_int64_from_file(const char *fname)
        uint64_t value;
        if (!fp)
                return 0;
-       if (fscanf(fp, "%lld", &value) != 1)
+       if (fscanf(fp, "%" PRId64, &value) != 1)
                value = 0;
        fclose(fp);
        return value;
index 1111d18..1697599 100644 (file)
@@ -23,7 +23,7 @@ Source:    %{name}_%{version}.tar.gz
 %define WSI_SUPPORT 0
 %endif
 
-ExcludeArch: aarch64 x86_64
+ExcludeArch: x86_64
 BuildRequires: smack-devel
 BuildRequires: libattr-devel
 BuildRequires: glib2-devel