diff --git a/getVersion.sh b/getVersion.sh index c6a83f7..5cb7a57 100755 --- a/getVersion.sh +++ b/getVersion.sh @@ -2,6 +2,7 @@ dir=`mktemp -d` cat > "$dir/libhomegear-base-version.cpp" <<-'EOF' #include "homegear-base/BaseLib.h" +#include int main(int argc, char** argv) { @@ -9,7 +10,7 @@ int main(int argc, char** argv) return 0; } EOF -g++ -std=c++11 -o $dir/libhomegear-base-version $dir/libhomegear-base-version.cpp -lhomegear-base -lgcrypt -lgnutls +g++ -std=c++11 -o $dir/libhomegear-base-version $dir/libhomegear-base-version.cpp -lhomegear-base -lgcrypt -lgnutls -lpthread -latomic chmod 755 $dir/libhomegear-base-version $dir/libhomegear-base-version rm -Rf $dir diff --git a/src/DescriptionCreator.cpp b/src/DescriptionCreator.cpp index f38b2f8..53eb722 100644 --- a/src/DescriptionCreator.cpp +++ b/src/DescriptionCreator.cpp @@ -51,20 +51,20 @@ void DescriptionCreator::createDirectories() if(!BaseLib::Io::directoryExists(path1)) BaseLib::Io::createDirectory(path1, GD::bl->settings.dataPathPermissions()); if(localUserId != 0 || localGroupId != 0) { - if(chown(path1.c_str(), localUserId, localGroupId) == -1) std::cerr << "Could not set owner on " << path1 << std::endl; - if(chmod(path1.c_str(), GD::bl->settings.dataPathPermissions()) == -1) std::cerr << "Could not set permissions on " << path1 << std::endl; + if(chown(path1.c_str(), localUserId, localGroupId) == -1) GD::out.printWarning("Could not set owner on " + path1); + if(chmod(path1.c_str(), GD::bl->settings.dataPathPermissions()) == -1) GD::out.printWarning("Could not set permissions on " + path1); } if(!BaseLib::Io::directoryExists(path2)) BaseLib::Io::createDirectory(path2, GD::bl->settings.dataPathPermissions()); if(localUserId != 0 || localGroupId != 0) { - if(chown(path2.c_str(), localUserId, localGroupId) == -1) std::cerr << "Could not set owner on " << path2 << std::endl; - if(chmod(path2.c_str(), GD::bl->settings.dataPathPermissions()) == -1) std::cerr << "Could not set permissions on " << path2 << std::endl; + if(chown(path2.c_str(), localUserId, localGroupId) == -1) GD::out.printWarning("Could not set owner on " + path2); + if(chmod(path2.c_str(), GD::bl->settings.dataPathPermissions()) == -1) GD::out.printWarning("Could not set permissions on " + path2); } if(!BaseLib::Io::directoryExists(_xmlPath)) BaseLib::Io::createDirectory(_xmlPath, GD::bl->settings.dataPathPermissions()); if(localUserId != 0 || localGroupId != 0) { - if(chown(_xmlPath.c_str(), localUserId, localGroupId) == -1) std::cerr << "Could not set owner on " << _xmlPath << std::endl; - if(chmod(_xmlPath.c_str(), GD::bl->settings.dataPathPermissions()) == -1) std::cerr << "Could not set permissions on " << _xmlPath << std::endl; + if(chown(_xmlPath.c_str(), localUserId, localGroupId) == -1) GD::out.printWarning("Could not set owner on " + _xmlPath); + if(chmod(_xmlPath.c_str(), GD::bl->settings.dataPathPermissions()) == -1) GD::out.printWarning("Could not set permissions on " + _xmlPath); } } catch(const std::exception& ex) diff --git a/src/MyCentral.cpp b/src/MyCentral.cpp index f599fd0..333168d 100644 --- a/src/MyCentral.cpp +++ b/src/MyCentral.cpp @@ -30,6 +30,8 @@ #include "MyCentral.h" #include "GD.h" +#include + namespace MyFamily { MyCentral::MyCentral(ICentralEventSink* eventHandler) : BaseLib::Systems::ICentral(MY_FAMILY_ID, GD::bl, eventHandler) diff --git a/src/MyPeer.cpp b/src/MyPeer.cpp index 3b72cef..1b8eb53 100644 --- a/src/MyPeer.cpp +++ b/src/MyPeer.cpp @@ -33,6 +33,8 @@ #include "MyPacket.h" #include "MyCentral.h" +#include + namespace MyFamily { std::shared_ptr MyPeer::getCentral()