commit: 03a6945711dd5aeded336d51f022a353ecf67350 Author: David Seifert <soap <AT> gentoo <DOT> org> AuthorDate: Sun Jan 29 11:55:20 2023 +0000 Commit: David Seifert <soap <AT> gentoo <DOT> org> CommitDate: Sun Jan 29 11:55:20 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03a69457
sys-fs/lvm2: fix botched musl patch on glibc Closes: https://bugs.gentoo.org/892487 Signed-off-by: David Seifert <soap <AT> gentoo.org> sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch | 15 +++++++++------ .../lvm2/{lvm2-2.03.18.ebuild => lvm2-2.03.18-r1.ebuild} | 0 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch b/sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch index 13afb81796ac..94fb99e04025 100644 --- a/sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch +++ b/sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch @@ -1,4 +1,4 @@ -From c2817ff30c4ad1e1a171ee0e914dbecdd486e3cf Mon Sep 17 00:00:00 2001 +From a2b9c9d2fe4d3f3869e8748dd44da44b67ba5a66 Mon Sep 17 00:00:00 2001 From: David Seifert <[email protected]> Date: Sat, 28 Jan 2023 14:22:42 +0100 Subject: [PATCH] Use `freopen()` on {stdin,stdout,stderr} @@ -7,20 +7,23 @@ Subject: [PATCH] Use `freopen()` on {stdin,stdout,stderr} lvalues. Glibc even calls out this behaviour as non-portable: https://www.gnu.org/software/libc/manual/html_node/Standard-Streams.html --- - lib/log/log.c | 2 +- + lib/log/log.c | 4 ++++ tools/lvmcmdline.c | 6 +++--- - 2 files changed, 4 insertions(+), 4 deletions(-) + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/log/log.c b/lib/log/log.c -index 118a3ba42..aecc72611 100644 +index 118a3ba42..a94016d81 100644 --- a/lib/log/log.c +++ b/lib/log/log.c -@@ -208,7 +208,7 @@ int reopen_standard_stream(FILE **stream, const char *mode) +@@ -208,7 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode) _check_and_replace_standard_log_streams(old_stream, new_stream); -- *stream = new_stream; ++#ifdef __GLIBC__ + *stream = new_stream; ++#else + freopen(NULL, mode, *stream); ++#endif return 1; } diff --git a/sys-fs/lvm2/lvm2-2.03.18.ebuild b/sys-fs/lvm2/lvm2-2.03.18-r1.ebuild similarity index 100% rename from sys-fs/lvm2/lvm2-2.03.18.ebuild rename to sys-fs/lvm2/lvm2-2.03.18-r1.ebuild
