Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: sys-fs/lvm2/, sys-fs/lvm2/files/
Date: Fri, 10 May 2019 00:55:47
Message-Id: 1557449718.34562518b28c188f62e8e3e6f12a917150d559f4.blueness@gentoo
1 commit: 34562518b28c188f62e8e3e6f12a917150d559f4
2 Author: thyrc <thyrc <AT> users <DOT> noreply <DOT> github <DOT> com>
3 AuthorDate: Thu May 9 10:54:31 2019 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Fri May 10 00:55:18 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=34562518
7
8 re-implement libc specific reopen_stream
9
10 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
11
12 ...183-implement-libc-specific-reopen_stream.patch | 24 ++++++++++++++++++++++
13 sys-fs/lvm2/lvm2-2.02.183.ebuild | 1 +
14 2 files changed, 25 insertions(+)
15
16 diff --git a/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch b/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch
17 new file mode 100644
18 index 0000000..6034be3
19 --- /dev/null
20 +++ b/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch
21 @@ -0,0 +1,24 @@
22 +diff --git a/lib/log/log.c b/lib/log/log.c
23 +index 79fbd7a..0999d10 100644
24 +--- a/lib/log/log.c
25 ++++ b/lib/log/log.c
26 +@@ -161,6 +161,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_
27 + * Close and reopen standard stream on file descriptor fd.
28 + */
29 + int reopen_standard_stream(FILE **stream, const char *mode)
30 ++#ifdef __GLIBC__
31 + {
32 + int fd, fd_copy, new_fd;
33 + const char *name;
34 +@@ -207,6 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode)
35 + *stream = new_stream;
36 + return 1;
37 + }
38 ++#else
39 ++{
40 ++ return (freopen(NULL, mode, *stream) != NULL);
41 ++}
42 ++#endif
43 +
44 + void init_log_fn(lvm2_log_fn_t log_fn)
45 + {
46
47 diff --git a/sys-fs/lvm2/lvm2-2.02.183.ebuild b/sys-fs/lvm2/lvm2-2.02.183.ebuild
48 index 9697b02..b3a7fb5 100644
49 --- a/sys-fs/lvm2/lvm2-2.02.183.ebuild
50 +++ b/sys-fs/lvm2/lvm2-2.02.183.ebuild
51 @@ -56,6 +56,7 @@ PATCHES=(
52 # Musl fixes
53 "${FILESDIR}"/${PN}-2.02.183-fix-stdio-usage.patch
54 "${FILESDIR}"/${PN}-2.02.183-portability.patch
55 + "${FILESDIR}"/${PN}-2.02.183-implement-libc-specific-reopen_stream.patch
56
57 # For upstream -- review and forward:
58 "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch