diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2018-03-21 21:42:16 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2018-03-21 21:42:28 +0000 |
commit | 9daa45a18156494207a6fd10be4931681c71a890 (patch) | |
tree | 279f99ec0c168d38ced1eecf66fa26b06a15e2bb /app-editors/hteditor | |
parent | net-misc/curl-7.59.0: hppa stable, bug 650056 (diff) | |
download | gentoo-9daa45a18156494207a6fd10be4931681c71a890.tar.gz gentoo-9daa45a18156494207a6fd10be4931681c71a890.tar.bz2 gentoo-9daa45a18156494207a6fd10be4931681c71a890.zip |
app-editors/hteditor: fix build failure on g++-6/powerpc (noticed by iv_)
The patch is proposed upstream as
https://github.com/sebastianbiallas/ht/pull/21
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'app-editors/hteditor')
-rw-r--r-- | app-editors/hteditor/files/hteditor-2.1.0-gcc-6-uchar.patch | 45 | ||||
-rw-r--r-- | app-editors/hteditor/hteditor-2.1.0.ebuild | 1 |
2 files changed, 46 insertions, 0 deletions
diff --git a/app-editors/hteditor/files/hteditor-2.1.0-gcc-6-uchar.patch b/app-editors/hteditor/files/hteditor-2.1.0-gcc-6-uchar.patch new file mode 100644 index 000000000000..67eaa6e01491 --- /dev/null +++ b/app-editors/hteditor/files/hteditor-2.1.0-gcc-6-uchar.patch @@ -0,0 +1,45 @@ +https://github.com/sebastianbiallas/ht/pull/21 + +From 7ce68c4bca7fd64c0073f1770c6b5761c03174f0 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Wed, 21 Mar 2018 21:30:31 +0000 +Subject: [PATCH] ht: fix build failure on -funsigned-char platforms + +powerpc (and arm) have 'char' == 'unsigned char' by default. +This causes build failures on c++11: + +``` +$ ./configure CFLAGS=-funsigned-char CXXFLAGS=-funsigned-char +$ make + +g++ -DHAVE_CONFIG_H -I. -I./analyser -I./asm -I./info -I./io/posix -I./io -I./output -I./eval -I. -DNOMACROS -pipe -O3 -fomit-frame-pointer -Wall -fsigned-char -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c++14 -Woverloaded-virtual -Wnon-virtual-dtor -funsigned-char -MT htcoffhd.o -MD -MP -MF .deps/htcoffhd.Tpo -c -o htcoffhd.o htcoffhd.cc +htcoffhd.cc:93:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] + }; + ^ +htcoffhd.cc:131:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] + }; +``` + +Use 'signed char' explicitly to maintain existing behavior. + +Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> +--- + httag.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/httag.h b/httag.h +index 7f5da1c..83e5c22 100644 +--- a/httag.h ++++ b/httag.h +@@ -69,7 +69,7 @@ struct ht_tag_flags { + } PACKED; + + struct ht_tag_flags_s { +- char bitidx; ++ signed char bitidx; + const char *desc; + } PACKED; + +-- +2.16.2 + diff --git a/app-editors/hteditor/hteditor-2.1.0.ebuild b/app-editors/hteditor/hteditor-2.1.0.ebuild index 5e5d0e083085..1f5fc5b5ee5c 100644 --- a/app-editors/hteditor/hteditor-2.1.0.ebuild +++ b/app-editors/hteditor/hteditor-2.1.0.ebuild @@ -30,6 +30,7 @@ S=${WORKDIR}/${MY_P} PATCHES=( "${FILESDIR}"/${P}-gcc-7.patch "${FILESDIR}"/${P}-tinfo.patch + "${FILESDIR}"/${P}-gcc-6-uchar.patch ) src_prepare() { |