You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-wireless/qdmr/files/qdmr-0.10.2-musl.patch

35 lines
1.2 KiB

From eca81fba54b156707545967b78c823cc38b1b53f Mon Sep 17 00:00:00 2001
From: Hannes Matuschek <hmatuschek@gmail.com>
Date: Wed, 6 Apr 2022 15:29:02 +0200
Subject: [PATCH] Fixed compilation issue under Genoo. Addresses #216.
---
lib/radiolimits.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/radiolimits.cc b/lib/radiolimits.cc
index b883cc8..eb72166 100644
--- a/lib/radiolimits.cc
+++ b/lib/radiolimits.cc
@@ -3,9 +3,10 @@
#include "logger.hh"
#include "config.hh"
#include <QMetaProperty>
+#include <ctype.h>
// Utility function to check string content for ASCII encoding
-inline bool isascii(const QString &text) {
+inline bool qstring_is_ascii(const QString &text) {
foreach (QChar c, text) {
if ((c<0x1f) && (0x7f != c))
return false;
@@ -205,7 +206,7 @@ RadioLimitString::verify(const ConfigItem *item, const QMetaProperty &prop, Radi
<< ") is shorter than minimum size " << _minLen << ".";
}
- if ((ASCII == _encoding) && (! isascii(value))) {
+ if ((ASCII == _encoding) && (! qstring_is_ascii(value))) {
auto &msg = context.newMessage();
msg << "Cannot encode string '" << value << "' in ASCII.";
}