summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2017-06-07 10:44:31 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2017-06-07 10:44:58 +0100
commit0003702b3c82e0b9bfc4233c6e081885043db1f0 (patch)
tree2f1a23aaacf5ed726630052cd11b63dae639643a /app-editors/hteditor
parentnet-libs/gnutls: version bump (diff)
downloadgentoo-0003702b3c82e0b9bfc4233c6e081885043db1f0.tar.gz
gentoo-0003702b3c82e0b9bfc4233c6e081885043db1f0.tar.bz2
gentoo-0003702b3c82e0b9bfc4233c6e081885043db1f0.zip
app-editors/hteditor: fix build failure against gcc-7, bug #620732
Bug: https://bugs.gentoo.org/620732 Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'app-editors/hteditor')
-rw-r--r--app-editors/hteditor/files/hteditor-2.1.0-gcc-7.patch32
-rw-r--r--app-editors/hteditor/hteditor-2.1.0.ebuild2
2 files changed, 34 insertions, 0 deletions
diff --git a/app-editors/hteditor/files/hteditor-2.1.0-gcc-7.patch b/app-editors/hteditor/files/hteditor-2.1.0-gcc-7.patch
new file mode 100644
index 000000000000..ebcc3c0aa43e
--- /dev/null
+++ b/app-editors/hteditor/files/hteditor-2.1.0-gcc-7.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/show_bug.cgi?id=620732
+
+Fixes build failure on gcc-7:
+
+ htapp.cc: In function 'uint isqr(uint)':
+ htapp.cc:3026:18: error: call of overloaded 'abs(uint)' is ambiguous
+ while (abs(a - b) > 1) {
+ ^
+
+Picked upstream patch that fixes it:
+
+commit 3b62f2f7e49e024ec9d3c5ffc8ff9cd87a107af6
+Author: Sebastian Biallas <sb@biallas.net>
+Date: Sun Nov 13 15:25:26 2016 +0100
+
+ use unsigned variables
+
+diff --git a/htapp.cc b/htapp.cc
+index 53d8725..03236e2 100644
+--- a/htapp.cc
++++ b/htapp.cc
+@@ -3021,8 +3021,8 @@ void do_modal_resize()
+
+ static uint isqr(uint u)
+ {
+- uint a = 2;
+- uint b = u/a;
++ int a = 2;
++ int b = u/a;
+ while (abs(a - b) > 1) {
+ a = (a+b)/2;
+ b = u/a;
diff --git a/app-editors/hteditor/hteditor-2.1.0.ebuild b/app-editors/hteditor/hteditor-2.1.0.ebuild
index 169d1bfcbc3b..a38ef31072d0 100644
--- a/app-editors/hteditor/hteditor-2.1.0.ebuild
+++ b/app-editors/hteditor/hteditor-2.1.0.ebuild
@@ -27,6 +27,8 @@ DOCS=( AUTHORS ChangeLog KNOWNBUGS README TODO )
S=${WORKDIR}/${MY_P}
+PATCHES=("${FILESDIR}"/${P}-gcc-7.patch)
+
src_configure() {
econf \
$(use_enable X x11-textmode) \