Fix for x86_64 compatibility tizen_2.1 2.1b_release accepted/tizen/20130520.100635 accepted/tizen_2.1/20130425.040621 submit/tizen/20130517.044608 submit/tizen_2.1/20130424.230241
authorJunfeng <junfeng.dong@intel.com>
Thu, 21 Mar 2013 12:50:57 +0000 (20:50 +0800)
committerlifang <fangx.li@intel.com>
Thu, 28 Mar 2013 21:38:19 +0000 (05:38 +0800)
- Fix hardcoding library path
- Fix the problem of casting between pointer and int.

Change-Id: I18fdad5b63358cc37966094e9edc3124c934f851

CMakeLists.txt
capi-network-bluetooth.pc.in
packaging/capi-network-bluetooth.spec
test/bt_unit_test.c

index 47e3695..6ac39eb 100644 (file)
@@ -28,7 +28,7 @@ ENDIF("${ARCH}" STREQUAL "arm")
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 ADD_DEFINITIONS("-DTIZEN_DEBUG")
 
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
 
 SET(SOURCES
 src/bluetooth-common.c
@@ -56,7 +56,7 @@ SET_TARGET_PROPERTIES(${fw_name}
      CLEAN_DIRECT_OUTPUT 1
 )
 
-INSTALL(TARGETS ${fw_name} DESTINATION lib)
+INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
 INSTALL(
         DIRECTORY ${INC_DIR}/ DESTINATION include/network
         FILES_MATCHING
@@ -73,7 +73,7 @@ CONFIGURE_FILE(
     ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
     @ONLY
 )
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 
 ADD_SUBDIRECTORY(test)
 
index 097a2d1..85a129a 100644 (file)
@@ -2,8 +2,8 @@
 
 prefix=@PREFIX@
 exec_prefix=/usr
-libdir=/usr/lib
-includedir=/usr/include/network
+libdir=@LIB_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@/network
 
 Name: @PC_NAME@
 Description: @PACKAGE_DESCRIPTION@
index fdd266c..7ecde77 100644 (file)
@@ -35,7 +35,7 @@ Network Bluetooth Framework (DEV).
 
 %build
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
 
 make %{?jobs:-j%jobs}
 
index 6876880..75c719e 100644 (file)
@@ -446,7 +446,7 @@ void __bt_avrcp_scan_mode_changed_cb(bt_avrcp_scan_mode_e scan, void *user_data)
 int test_input_callback(void *data)
 {
        int ret = 0;
-       int test_id = (int)data;
+       long test_id = (long)data;
 
        switch (test_id) {
        case 0x00ff:
@@ -1153,8 +1153,8 @@ static gboolean key_event_cb(GIOChannel *chan,
 {
        char buf[BUFFER_LEN] = { 0 };
 
-       unsigned int len = 0;
-       int test_id;
+       gsize len = 0;
+       long test_id;
 
        memset(buf, 0, sizeof(buf));