1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-13 10:59:13 +02:00
openwrt-packages/multimedia/gerbera/patches/010-iconv.patch
Rosen Penev 1619ec812b
gerbera: use npupnp
This is on track to replace libupnp in the next version. Since libupnp
is not building with GCC10, do this now.

Also backported needed header patch.

Replace other patches with the upstream versions.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-06-22 14:37:47 -07:00

37 lines
1.1 KiB
Diff

From 77cae5ff9b8dff22bfebac905f1579562609dd35 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Mon, 4 May 2020 12:44:34 -0700
Subject: [PATCH] remove iconv casting
iconv_t is sometimes a pointer and other times an int. Remove casting
to make it work with the latter.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
src/util/string_converter.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/util/string_converter.cc b/src/util/string_converter.cc
index 272787ad..e1724b39 100644
--- a/src/util/string_converter.cc
+++ b/src/util/string_converter.cc
@@ -41,15 +41,15 @@ StringConverter::StringConverter(const std::string& from, const std::string& to)
dirty = false;
cd = iconv_open(to.c_str(), from.c_str());
- if (cd == reinterpret_cast<iconv_t>(-1)) {
- cd = static_cast<iconv_t>(nullptr);
+ if (!cd) {
+ cd = {};
throw_std_runtime_error(std::string("iconv: ") + strerror(errno));
}
}
StringConverter::~StringConverter()
{
- if (cd != static_cast<iconv_t>(nullptr))
+ if (cd)
iconv_close(cd);
}