1 |
commit: a5efd9c0877f5e41e6e33cb3ccbf09b69422ca6c |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 30 21:54:16 2020 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 30 21:54:55 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=a5efd9c0 |
7 |
|
8 |
sys-fs/lvm2: re-add reopen_stream patch |
9 |
|
10 |
reported by thyrc on IRC |
11 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
12 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
13 |
|
14 |
...183-implement-libc-specific-reopen_stream.patch | 24 ++++++++++++++++++++++ |
15 |
...-2.02.187-r2.ebuild => lvm2-2.02.187-r3.ebuild} | 1 + |
16 |
2 files changed, 25 insertions(+) |
17 |
|
18 |
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 |
19 |
new file mode 100644 |
20 |
index 0000000..6034be3 |
21 |
--- /dev/null |
22 |
+++ b/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch |
23 |
@@ -0,0 +1,24 @@ |
24 |
+diff --git a/lib/log/log.c b/lib/log/log.c |
25 |
+index 79fbd7a..0999d10 100644 |
26 |
+--- a/lib/log/log.c |
27 |
++++ b/lib/log/log.c |
28 |
+@@ -161,6 +161,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_ |
29 |
+ * Close and reopen standard stream on file descriptor fd. |
30 |
+ */ |
31 |
+ int reopen_standard_stream(FILE **stream, const char *mode) |
32 |
++#ifdef __GLIBC__ |
33 |
+ { |
34 |
+ int fd, fd_copy, new_fd; |
35 |
+ const char *name; |
36 |
+@@ -207,6 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode) |
37 |
+ *stream = new_stream; |
38 |
+ return 1; |
39 |
+ } |
40 |
++#else |
41 |
++{ |
42 |
++ return (freopen(NULL, mode, *stream) != NULL); |
43 |
++} |
44 |
++#endif |
45 |
+ |
46 |
+ void init_log_fn(lvm2_log_fn_t log_fn) |
47 |
+ { |
48 |
|
49 |
diff --git a/sys-fs/lvm2/lvm2-2.02.187-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.187-r3.ebuild |
50 |
similarity index 99% |
51 |
rename from sys-fs/lvm2/lvm2-2.02.187-r2.ebuild |
52 |
rename to sys-fs/lvm2/lvm2-2.02.187-r3.ebuild |
53 |
index a134187..91b6d1c 100644 |
54 |
--- a/sys-fs/lvm2/lvm2-2.02.187-r2.ebuild |
55 |
+++ b/sys-fs/lvm2/lvm2-2.02.187-r3.ebuild |
56 |
@@ -58,6 +58,7 @@ PATCHES=( |
57 |
# Musl fixes |
58 |
"${FILESDIR}"/${PN}-2.02.183-fix-stdio-usage.patch |
59 |
"${FILESDIR}"/${PN}-2.02.183-portability.patch |
60 |
+ "${FILESDIR}"/${PN}-2.02.183-implement-libc-specific-reopen_stream.patch |
61 |
|
62 |
# For upstream -- review and forward: |
63 |
"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch |