aboutsummaryrefslogtreecommitdiff
path: root/utils/telldus-core
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2021-07-06 19:39:33 -0700
committerRosen Penev <rosenp@gmail.com>2021-07-11 00:26:35 -0700
commit1cebb8e27851fcf1e91fc746251783f41a489bd3 (patch)
tree348fcfc355c4e37c911b7d478acdabbdca30cd7c /utils/telldus-core
parentf200c802c31a31cfa4cbfe847c437f04b3d0a698 (diff)
telldus-core: fix compilation with GCC11
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'utils/telldus-core')
-rw-r--r--utils/telldus-core/Makefile2
-rw-r--r--utils/telldus-core/patches/970-gcc11.patch33
2 files changed, 34 insertions, 1 deletions
diff --git a/utils/telldus-core/Makefile b/utils/telldus-core/Makefile
index 96d7dfc64..70374ce1a 100644
--- a/utils/telldus-core/Makefile
+++ b/utils/telldus-core/Makefile
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=telldus-core
PKG_VERSION:=2.1.2
-PKG_RELEASE:=6
+PKG_RELEASE:=7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://download.telldus.com/TellStick/Software/telldus-core/
diff --git a/utils/telldus-core/patches/970-gcc11.patch b/utils/telldus-core/patches/970-gcc11.patch
new file mode 100644
index 000000000..a575647d7
--- /dev/null
+++ b/utils/telldus-core/patches/970-gcc11.patch
@@ -0,0 +1,33 @@
+--- a/service/SettingsConfuse.cpp
++++ b/service/SettingsConfuse.cpp
+@@ -42,10 +42,10 @@ Settings::Settings(void) {
+ */
+ Settings::~Settings(void) {
+ TelldusCore::MutexLocker locker(&mutex);
+- if (d->cfg > 0) {
++ if (d->cfg) {
+ cfg_free(d->cfg);
+ }
+- if (d->var_cfg > 0) {
++ if (d->var_cfg) {
+ cfg_free(d->var_cfg);
+ }
+ delete d;
+@@ -56,7 +56,7 @@ Settings::~Settings(void) {
+ */
+ std::wstring Settings::getSetting(const std::wstring &strName) const {
+ TelldusCore::MutexLocker locker(&mutex);
+- if (d->cfg > 0) {
++ if (d->cfg) {
+ std::string setting(cfg_getstr(d->cfg, TelldusCore::wideToString(strName).c_str()));
+ return TelldusCore::charToWstring(setting.c_str());
+ }
+@@ -68,7 +68,7 @@ std::wstring Settings::getSetting(const
+ */
+ int Settings::getNumberOfNodes(Node node) const {
+ TelldusCore::MutexLocker locker(&mutex);
+- if (d->cfg > 0) {
++ if (d->cfg) {
+ if (node == Device) {
+ return cfg_size(d->cfg, "device");
+ } else if (node == Controller) {