commit:     e299215e94b8d6878fd12cea426083ab22c05f81
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 11 07:52:17 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Aug 11 07:52:28 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e299215e

app-forensics/honggfuzz: adapt to binutils-2.29 API change

disassembler() function got more parameters:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=003ca0fd22863aaf1a9811c8a35a0133a2d27fb1

Package-Manager: Portage-2.3.6, Repoman-2.3.3

 .../honggfuzz/files/honggfuzz-1.1-binutils-2.29.patch         | 11 +++++++++++
 app-forensics/honggfuzz/honggfuzz-1.1.ebuild                  |  7 +++++++
 2 files changed, 18 insertions(+)

diff --git a/app-forensics/honggfuzz/files/honggfuzz-1.1-binutils-2.29.patch 
b/app-forensics/honggfuzz/files/honggfuzz-1.1-binutils-2.29.patch
new file mode 100644
index 00000000000..31a57784ed8
--- /dev/null
+++ b/app-forensics/honggfuzz/files/honggfuzz-1.1-binutils-2.29.patch
@@ -0,0 +1,11 @@
+Adapt to binutils-2.29 API change caused by
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=003ca0fd22863aaf1a9811c8a35a0133a2d27fb1
+diff --git a/linux/bfd.c b/linux/bfd.c
+index bcd247f..e9e16ab 100644
+--- a/linux/bfd.c
++++ b/linux/bfd.c
+@@ -163,3 +163,3 @@ void arch_bfdDisasm(pid_t pid, uint8_t * mem, size_t size, 
char *instr)
+ 
+-    disassembler_ftype disassemble = disassembler(bfdh);
++    disassembler_ftype disassemble = disassembler(bfd_get_arch(bfdh), 
bfd_little_endian(bfdh), bfd_get_mach(bfdh), bfdh);
+     if (disassemble == NULL) {

diff --git a/app-forensics/honggfuzz/honggfuzz-1.1.ebuild 
b/app-forensics/honggfuzz/honggfuzz-1.1.ebuild
index 1e7413dc5fa..eb072b67c9b 100644
--- a/app-forensics/honggfuzz/honggfuzz-1.1.ebuild
+++ b/app-forensics/honggfuzz/honggfuzz-1.1.ebuild
@@ -28,6 +28,13 @@ DOCS=(
        README.md
 )
 
+src_prepare() {
+       default
+       if has_version ">=sys-libs/binutils-libs-2.29"; then
+               eapply "${FILESDIR}"/${PN}-1.1-binutils-2.29.patch
+       fi
+}
+
 src_compile() {
        CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" emake
 }

Reply via email to