Fix the arch64 build error 07/151807/1 accepted/tizen/4.0/unified/20170922.195448 submit/tizen_4.0/20170922.014023
authorDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 22 Sep 2017 05:07:05 +0000 (14:07 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 22 Sep 2017 05:07:05 +0000 (14:07 +0900)
Change-Id: Ie596691835bdb5dc60b3a9711ddd9bc342ebfcfa
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
obexd/client/mns-tizen.c
obexd/plugins/mas.c
packaging/bluez.spec
profiles/tds/tds.c
tools/pskey_get.c

index 47963e4..0c58482 100755 (executable)
@@ -111,7 +111,7 @@ static gchar *generate_event_report(gchar *event_type,
                        event == EVENT_TYPE_MEMORY_AVAILABLE)
                goto done;
 
-       g_string_append_printf(buf, "handle=\"%llx\" ", handle);
+       g_string_append_printf(buf, "handle=\"%llx\" ", (long long unsigned int)handle);
        g_string_append_printf(buf, "folder=\"%s\" ", folder);
 
        if (event == EVENT_TYPE_MESSAGE_SHIFT)
index 04b54d2..c684e0d 100755 (executable)
@@ -440,7 +440,7 @@ static void put_message_cb(void *session, int err, guint64 handle,
                return;
        }
        mas->finished = FALSE;
-       mas->response_handle = g_strdup_printf("%llx", handle);
+       mas->response_handle = g_strdup_printf("%llx", (long long unsigned int)handle);
 
        obex_object_set_io_flags(mas, G_IO_OUT, 0);
 }
@@ -746,7 +746,7 @@ static ssize_t message_write(void *object, const void *buf, size_t count)
 
        g_string_append_len(mas->buffer, buf, count);
 
-       DBG("count = %d \n", count);
+       DBG("count = %d \n", (int)count);
 
        if (g_strrstr(mas->buffer->str, "END:BMSG\r\n")) {
                DBG("BMsg received. \n");
@@ -857,7 +857,7 @@ static ssize_t put_next_header(void *object, void *buf, size_t mtu,
 
        len = strlen(mas->response_handle);
 
-       DBG("len %d\n", len);
+       DBG("len %d\n", (int)len);
        DBG("mas->response_handle %s\n", mas->response_handle);
 
        memcpy(buf, mas->response_handle, len);
index 1660308..e89e4cd 100755 (executable)
@@ -160,6 +160,16 @@ export CFLAGS_DEFAULT="$CFLAGS"
 
 export CFLAGS="$CFLAGS_DEFAULT"
 
+%ifarch aarch64
+echo arch64
+export CFLAGS+=" -DARCH64"
+%endif
+
+%ifarch x86_64
+echo x86_64
+export CFLAGS+=" -DARCH64"
+%endif
+
 %reconfigure --disable-static \
                        --sysconfdir=%{_sysconfdir} \
                        --localstatedir=%{_localstatedir} \
@@ -208,6 +218,16 @@ export CFLAGS_DEFAULT="$CFLAGS"
 
 export CFLAGS="$CFLAGS_DEFAULT"
 
+%ifarch aarch64
+echo arch64
+export CFLAGS+=" -DARCH64"
+%endif
+
+%ifarch x86_64
+echo x86_64
+export CFLAGS+=" -DARCH64"
+%endif
+
 %reconfigure --disable-static \
                        --sysconfdir=%{_sysconfdir} \
                        --localstatedir=%{_localstatedir} \
@@ -258,6 +278,16 @@ export CFLAGS_DEFAULT="$CFLAGS"
 
 export CFLAGS="$CFLAGS_DEFAULT"
 
+%ifarch aarch64
+echo arch64
+export CFLAGS+=" -DARCH64"
+%endif
+
+%ifarch x86_64
+echo x86_64
+export CFLAGS+=" -DARCH64"
+%endif
+
 %reconfigure --disable-static \
                        --sysconfdir=%{_sysconfdir} \
                        --localstatedir=%{_localstatedir} \
index 64af8aa..b72d1e5 100755 (executable)
@@ -324,10 +324,10 @@ static void tds_control_point_char_write(struct gatt_db_attribute *attrib,
                                         uint8_t opcode, struct bt_att *att,
                                         void *user_data)
 {
-       DBG("len [%d]", len);
-       DBG("Opcode [%d]", opcode);
-       DBG("TRansaction ID [%d]", id);
-       DBG("Offset [%d]", offset);
+       DBG("len [%d]", (int)len);
+       DBG("Opcode [%d]", (int)opcode);
+       DBG("TRansaction ID [%d]", (int)id);
+       DBG("Offset [%d]", (int)offset);
 
        uint8_t ecode = 0;
        struct btd_device *device = NULL;
@@ -530,7 +530,7 @@ static void tds_control_point_ccc_write_cb(struct gatt_db_attribute *attrib,
        struct connected_device *condev = NULL;
        uint8_t ecode = 0;
        DBG("TDS Control Point CCC Write requested..len [%d] val [0x%x] val [0x%x]",
-                       len, value[0], value[1]);
+                       (int)len, value[0], value[1]);
 
        if (!value || len != 2) {
                ecode = BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN;
index db4d228..6941890 100755 (executable)
 #define MAX_BOARD_TYPE_LEN 32
 
 #define _FILE_PARSE_DEBUG_
-#define  CMD_ITEM_TABLE(ITEM, MEM_OFFSET, TYPE)    { ITEM,   (unsigned int)( &(  ((BT_PSKEY_CONFIG_T *)(0))->MEM_OFFSET )),   TYPE }
+
+#ifdef ARCH64
+#define CMD_ITEM_TABLE(ITEM, MEM_OFFSET, TYPE)    { ITEM,   (unsigned long)( &(  ((BT_PSKEY_CONFIG_T *)(0))->MEM_OFFSET )),   TYPE }
+#else
+#define CMD_ITEM_TABLE(ITEM, MEM_OFFSET, TYPE)    { ITEM,   (unsigned int)( &(  ((BT_PSKEY_CONFIG_T *)(0))->MEM_OFFSET )),   TYPE }
+#endif
+
 #define ALOGI(fmt, arg...)  fprintf(stderr, "%s:%d()" fmt "\n", __FILE__,__LINE__, ## arg)
 #define ALOGE(fmt, arg...)  fprintf(stderr, "%s:%d()" fmt "\n", __FILE__,__LINE__, ## arg)