Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-forensics/honggfuzz/, app-forensics/honggfuzz/files/
Date: Mon, 29 Nov 2021 19:33:59
Message-Id: 1638214429.ad8f95bc0feb13a824d6287f63960e842c3d8679.marecki@gentoo
1 commit: ad8f95bc0feb13a824d6287f63960e842c3d8679
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 29 19:32:37 2021 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 29 19:33:49 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad8f95bc
7
8 app-forensics/honggfuzz: fix building against musl
9
10 With many thanks to sam for having pointed me to queue-standalone!
11
12 Closes: https://bugs.gentoo.org/715648
13 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
14
15 .../files/honggfuzz-2.4-headers-musl.patch | 45 ++++++++++++++++++++++
16 app-forensics/honggfuzz/honggfuzz-2.4.ebuild | 6 ++-
17 2 files changed, 49 insertions(+), 2 deletions(-)
18
19 diff --git a/app-forensics/honggfuzz/files/honggfuzz-2.4-headers-musl.patch b/app-forensics/honggfuzz/files/honggfuzz-2.4-headers-musl.patch
20 new file mode 100644
21 index 000000000000..e70d6eae4eaf
22 --- /dev/null
23 +++ b/app-forensics/honggfuzz/files/honggfuzz-2.4-headers-musl.patch
24 @@ -0,0 +1,45 @@
25 +From 29864795b194481dd0446326cda89b9802f4fe51 Mon Sep 17 00:00:00 2001
26 +From: David Carlier <devnexen@×××××.com>
27 +Date: Sat, 8 May 2021 11:23:32 +0100
28 +Subject: [PATCH] musl build fix proposal
29 +
30 +--- a/linux/arch.c
31 ++++ b/linux/arch.c
32 +@@ -34,7 +34,9 @@
33 + #include <stdio.h>
34 + #include <stdlib.h>
35 + #include <string.h>
36 ++#if defined(__GLIBC__)
37 + #include <sys/cdefs.h>
38 ++#endif
39 + #include <sys/personality.h>
40 + #include <sys/prctl.h>
41 + #include <sys/syscall.h>
42 +--- a/linux/perf.c
43 ++++ b/linux/perf.c
44 +@@ -30,12 +30,12 @@
45 + #include <linux/hw_breakpoint.h>
46 + #include <linux/perf_event.h>
47 + #include <linux/sysctl.h>
48 ++#include <poll.h>
49 + #include <signal.h>
50 + #include <stdlib.h>
51 + #include <string.h>
52 + #include <sys/ioctl.h>
53 + #include <sys/mman.h>
54 +-#include <sys/poll.h>
55 + #include <sys/ptrace.h>
56 + #include <sys/syscall.h>
57 + #include <unistd.h>
58 +--- a/linux/trace.c
59 ++++ b/linux/trace.c
60 +@@ -34,7 +34,9 @@
61 + #include <stdio.h>
62 + #include <stdlib.h>
63 + #include <string.h>
64 ++#if defined(__GLIBC__)
65 + #include <sys/cdefs.h>
66 ++#endif
67 + #include <sys/personality.h>
68 + #include <sys/ptrace.h>
69 + #include <sys/resource.h>
70
71 diff --git a/app-forensics/honggfuzz/honggfuzz-2.4.ebuild b/app-forensics/honggfuzz/honggfuzz-2.4.ebuild
72 index e73640196eb9..5220a5f4c483 100644
73 --- a/app-forensics/honggfuzz/honggfuzz-2.4.ebuild
74 +++ b/app-forensics/honggfuzz/honggfuzz-2.4.ebuild
75 @@ -12,7 +12,7 @@ SRC_URI="https://github.com/google/honggfuzz/archive/${PV}.tar.gz -> ${P}.tar.gz
76 LICENSE="Apache-2.0"
77 SLOT="0"
78 KEYWORDS="~amd64"
79 -IUSE="clang"
80 +IUSE="clang elibc_musl"
81
82 RDEPEND="
83 >=sys-libs/binutils-libs-2.29:=
84 @@ -21,7 +21,8 @@ RDEPEND="
85 clang? ( sys-libs/blocksruntime )
86 "
87
88 -DEPEND="${RDEPEND}"
89 +DEPEND="${RDEPEND}
90 + elibc_musl? ( sys-libs/queue-standalone )"
91
92 DOCS=(
93 CHANGELOG
94 @@ -32,6 +33,7 @@ DOCS=(
95
96 PATCHES=(
97 "${FILESDIR}"/${PN}-2.0-no-werror.patch
98 + "${FILESDIR}"/${PN}-2.4-headers-musl.patch
99 )
100
101 pkg_pretend() {