Support for GCC 4.7
authorZbigniew Kostrzewa <z.kostrzewa@samsung.com>
Fri, 8 Feb 2013 09:49:20 +0000 (10:49 +0100)
committerGerrit Code Review <gerrit2@kim11>
Mon, 11 Feb 2013 14:29:56 +0000 (23:29 +0900)
Compatibility with GCC v 4.7 is required.

This commit fix problems with compilation with GCC 4.7.

[Issue#] N/A
[Bug] The repository causes build break with GCC 4.7
[Cause] N/A
[Solution] Source code adjusted to GCC 4.7

[Verification]
1. Build repository with GCC in current (4.5) and 4.7 version.

Change-Id: I8a0839e7a9d78b86c16f8feccecac3e3fbfd3ea0

src/jobs/widget_install/task_database.cpp
src/jobs/widget_install/task_file_manipulation.cpp
src/jobs/widget_install/task_manifest_file.cpp
src/jobs/widget_install/task_plugins_copy.cpp
src/jobs/widget_install/task_update_files.cpp
src/jobs/widget_uninstall/task_remove_files.cpp
src/pkg-manager/CMakeLists.txt
src/wrt-installer/CMakeLists.txt
src/wrt-installer/plugin_utils.cpp

index d5ba2b9..cc931a0 100644 (file)
@@ -21,6 +21,7 @@
  * @brief   Implementation file for installer task database updating for widget
  * update
  */
+#include <unistd.h>
 #include <time.h>
 #include <sys/stat.h>
 #include <widget_install/task_database.h>
index 65ccc0f..fddd770 100644 (file)
@@ -19,6 +19,7 @@
  * @version 1.0
  * @brief   Implementation file for installer task database updating
  */
+#include <unistd.h>
 #include <sys/stat.h>
 #include <dirent.h>
 #include <widget_install/task_file_manipulation.h>
index 92b372c..7187b52 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 //SYSTEM INCLUDES
+#include <unistd.h>
 #include <string>
 #include <dpl/assert.h>
 #include <dirent.h>
index 0e72ced..c91f7c2 100644 (file)
@@ -20,6 +20,7 @@
  * @brief   Copying plugins delivered in widget package.
  */
 
+#include <unistd.h>
 #include "task_plugins_copy.h"
 #include <dpl/log/log.h>
 #include <dpl/string.h>
index c9afcca..bcbd2f3 100644 (file)
@@ -20,6 +20,7 @@
  * @brief   Implementation file for installer task update files
  */
 
+#include <unistd.h>
 #include <utility>
 #include <vector>
 #include <string>
index 5dd82c4..5f66122 100644 (file)
@@ -20,6 +20,7 @@
  * @brief   Implementation file for uninstaller task for removing widget files
  */
 
+#include <unistd.h>
 #include <widget_uninstall/task_remove_files.h>
 #include <widget_uninstall/job_widget_uninstall.h>
 #include <widget_uninstall/uninstaller_context.h>
index ea06b72..eb754ea 100755 (executable)
@@ -41,7 +41,7 @@ TARGET_LINK_LIBRARIES(${TARGET_BACKEND_LIB}
 )
 
 SET_TARGET_PROPERTIES(${TARGET_BACKEND_LIB} PROPERTIES
-    LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both -Wl"
+    LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both"
 )
 
 INSTALL(TARGETS ${TARGET_BACKEND_LIB}
index 12d2c7c..aef18ba 100644 (file)
@@ -64,7 +64,7 @@ TARGET_LINK_LIBRARIES(${TARGET_INSTALLER}
 
 
 SET_TARGET_PROPERTIES(${TARGET_INSTALLER} PROPERTIES
-    LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both -Wl"
+    LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both"
     BUILD_WITH_INSTALL_RPATH ON
     INSTALL_RPATH_USE_LINK_PATH ON
 )
index 3b25cb6..f168866 100644 (file)
@@ -20,6 +20,7 @@
  * @brief   Header file for plugin util
  */
 
+#include <unistd.h>
 #include "plugin_utils.h"
 #include <dpl/exception.h>
 #include <dpl/log/log.h>