Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libtracefs/files/, dev-libs/libtracefs/
Date: Tue, 16 Aug 2022 16:38:21
Message-Id: 1660667891.7864d3d2f3e2a7f87341328afc4074f0ffd113b7.sam@gentoo
1 commit: 7864d3d2f3e2a7f87341328afc4074f0ffd113b7
2 Author: brahmajit das <listout <AT> protonmail <DOT> com>
3 AuthorDate: Tue Aug 16 16:25:49 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 16 16:38:11 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7864d3d2
7
8 dev-libs/libtracefs: Fix pthread_mutex_t unknown type on musl
9
10 On musl it is necessary to include pthread header else the compiler cannot
11 identify pthread_mutex_t as a known type
12
13 Closes: https://bugs.gentoo.org/855893
14
15 Signed-off-by: brahmajit das <listout <AT> protonmail.com>
16 Closes: https://github.com/gentoo/gentoo/pull/26882
17 Signed-off-by: Sam James <sam <AT> gentoo.org>
18
19 .../libtracefs/files/libtracefs-1.3.1-musl-pthread.patch | 16 ++++++++++++++++
20 dev-libs/libtracefs/libtracefs-1.3.1.ebuild | 4 ++++
21 2 files changed, 20 insertions(+)
22
23 diff --git a/dev-libs/libtracefs/files/libtracefs-1.3.1-musl-pthread.patch b/dev-libs/libtracefs/files/libtracefs-1.3.1-musl-pthread.patch
24 new file mode 100644
25 index 000000000000..0f909111150d
26 --- /dev/null
27 +++ b/dev-libs/libtracefs/files/libtracefs-1.3.1-musl-pthread.patch
28 @@ -0,0 +1,16 @@
29 +# On musl it is necessary to include pthread header else the compiler cannot
30 +# identify pthread_mutex_t as a known type
31 +# Closes: https://bugs.gentoo.org/855893
32 +diff --git a/include/tracefs-local.h b/include/tracefs-local.h
33 +index 926fd02..779e853 100644
34 +--- a/include/tracefs-local.h
35 ++++ b/include/tracefs-local.h
36 +@@ -6,6 +6,8 @@
37 + #ifndef _TRACE_FS_LOCAL_H
38 + #define _TRACE_FS_LOCAL_H
39 +
40 ++#include <pthread.h>
41 ++
42 + #define __hidden __attribute__((visibility ("hidden")))
43 + #define __weak __attribute__((weak))
44 +
45
46 diff --git a/dev-libs/libtracefs/libtracefs-1.3.1.ebuild b/dev-libs/libtracefs/libtracefs-1.3.1.ebuild
47 index ae5b3a5331b9..d5ffcefc4d9b 100644
48 --- a/dev-libs/libtracefs/libtracefs-1.3.1.ebuild
49 +++ b/dev-libs/libtracefs/libtracefs-1.3.1.ebuild
50 @@ -28,6 +28,10 @@ BDEPEND="
51 doc? ( app-text/xmlto app-text/asciidoc )
52 "
53
54 +PATCHES=(
55 + "${FILESDIR}"/${PN}-1.3.1-musl-pthread.patch
56 +)
57 +
58 src_configure() {
59 EMAKE_FLAGS=(
60 "prefix=${EPREFIX}/usr"