1 |
commit: 1205600d6d0ee0d83a00c6068c93a38e7f05d07c |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 29 14:06:37 2021 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 29 14:55:51 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1205600d |
7 |
|
8 |
app-forensics/zzuf: support musl in configure.ac |
9 |
|
10 |
One, call AC_USE_SYSTEM_EXTENSIONS so that all compiler invocations have |
11 |
the correct feature-set macros set. This is required so that configure |
12 |
can include the musl version of aio.h without |
13 |
|
14 |
error: field 'aio_sigevent' has incomplete type |
15 |
|
16 |
Not quite sure WHY this is necessary given that according to musl |
17 |
documentation, if no feature test macros are defined musl exposes the |
18 |
equivalent of _BSD_SOURCE - but there you go. |
19 |
|
20 |
Two, extend the test identifying the way of extracting raw position |
21 |
index from the structure fpos64_t, so that it supports the musl layout |
22 |
of this structure as well. |
23 |
|
24 |
With these two fixes in place zzuf builds successfully against musl. |
25 |
Tests (which currently have to be run manually because they like neither |
26 |
the sandbox nor out-of-tree builds) fail but in the same way as against |
27 |
glibc. |
28 |
|
29 |
Closes: https://bugs.gentoo.org/714030 |
30 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
31 |
|
32 |
.../zzuf/files/zzuf-0.15_autoconf-musl.patch | 24 ++++++++++++++++++++++ |
33 |
app-forensics/zzuf/zzuf-0.15_p20190208.ebuild | 4 ++++ |
34 |
2 files changed, 28 insertions(+) |
35 |
|
36 |
diff --git a/app-forensics/zzuf/files/zzuf-0.15_autoconf-musl.patch b/app-forensics/zzuf/files/zzuf-0.15_autoconf-musl.patch |
37 |
new file mode 100644 |
38 |
index 000000000000..0a56a968e84d |
39 |
--- /dev/null |
40 |
+++ b/app-forensics/zzuf/files/zzuf-0.15_autoconf-musl.patch |
41 |
@@ -0,0 +1,24 @@ |
42 |
+--- a/configure.ac |
43 |
++++ b/configure.ac |
44 |
+@@ -6,6 +6,8 @@ |
45 |
+ |
46 |
+ AC_PREREQ(2.50) |
47 |
+ |
48 |
++AC_USE_SYSTEM_EXTENSIONS |
49 |
++ |
50 |
+ AM_PROG_CC_C_O |
51 |
+ AC_PROG_CPP |
52 |
+ AC_PROG_LIBTOOL |
53 |
+@@ -172,6 +174,12 @@ |
54 |
+ AC_TRY_COMPILE( |
55 |
+ [#define _LARGEFILE64_SOURCE |
56 |
+ #define _LARGEFILE_SOURCE |
57 |
++ #include <stdio.h>], |
58 |
++ [fpos64_t x; long long int y = x.__lldata;], |
59 |
++ [ac_v_fpos64_t="(x).__lldata"]) |
60 |
++AC_TRY_COMPILE( |
61 |
++ [#define _LARGEFILE64_SOURCE |
62 |
++ #define _LARGEFILE_SOURCE |
63 |
+ #include <stdio.h>], |
64 |
+ [fpos64_t x; long long int y = (long long int)x;], |
65 |
+ [ac_v_fpos64_t="(x)"]) |
66 |
|
67 |
diff --git a/app-forensics/zzuf/zzuf-0.15_p20190208.ebuild b/app-forensics/zzuf/zzuf-0.15_p20190208.ebuild |
68 |
index 6b18d9b65c4d..e20563debda6 100644 |
69 |
--- a/app-forensics/zzuf/zzuf-0.15_p20190208.ebuild |
70 |
+++ b/app-forensics/zzuf/zzuf-0.15_p20190208.ebuild |
71 |
@@ -20,6 +20,10 @@ RESTRICT="test" |
72 |
|
73 |
DOCS=( AUTHORS COPYING TODO ) |
74 |
|
75 |
+PATCHES=( |
76 |
+ "${FILESDIR}"/${PN}-0.15_autoconf-musl.patch |
77 |
+) |
78 |
+ |
79 |
S="${WORKDIR}"/${PN}-${EGIT_COMMIT} |
80 |
|
81 |
src_prepare() { |