Added unistd.h for GCC 4.7 compatibility.
authorjunfeng <junfeng.dong@intel.com>
Tue, 19 Mar 2013 04:44:58 +0000 (12:44 +0800)
committerGerrit Code Review <gerrit2@kim11>
Wed, 20 Mar 2013 21:11:56 +0000 (06:11 +0900)
Change-Id: I181312dfcc6f8375bc85c26fa63bca29aaa716c8

modules/certificate_dao/dao/certificate_dao.cpp
modules/security_origin_dao/dao/security_origin_dao.cpp
modules/utils/src/path.cpp

index 4f1a719..5bcd6e7 100755 (executable)
 #include <dpl/wrt-dao-ro/common_dao_types.h>
 #include <sys/stat.h>
 #include <fstream>
+/* GCC versions 4.7 had changes to the C++ standard. It 
+ * no longer includes <unistd.h> to remove namespace pollution.
+ */
+#include <unistd.h>
 
 using namespace DPL::DB::ORM;
 using namespace DPL::DB::ORM::certificate;
index 746e61c..f3c4740 100755 (executable)
@@ -32,6 +32,7 @@
 #include <dpl/wrt-dao-ro/common_dao_types.h>
 #include <sys/stat.h>
 #include <fstream>
+#include <unistd.h>
 
 using namespace DPL::DB::ORM;
 using namespace DPL::DB::ORM::security_origin;
index 5ce44a1..6590e19 100644 (file)
@@ -28,7 +28,7 @@
 #include <dpl/file_input.h>
 #include <dpl/file_output.h>
 #include <dpl/copy.h>
-
+#include <unistd.h>
 #include <sys/stat.h>
 
 namespace DPL {