aboutsummaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorthyrc <thyrc@users.noreply.github.com>2019-05-09 12:54:31 +0200
committerAnthony G. Basile <blueness@gentoo.org>2019-05-09 20:55:18 -0400
commit34562518b28c188f62e8e3e6f12a917150d559f4 (patch)
tree844777e6ecc8772314817a749130714da0aa473d /sys-fs
parentnet-fs/nfs-utils: fixed repoman fatals (diff)
downloadmusl-34562518b28c188f62e8e3e6f12a917150d559f4.tar.gz
musl-34562518b28c188f62e8e3e6f12a917150d559f4.tar.bz2
musl-34562518b28c188f62e8e3e6f12a917150d559f4.zip
re-implement libc specific reopen_stream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch24
-rw-r--r--sys-fs/lvm2/lvm2-2.02.183.ebuild1
2 files changed, 25 insertions, 0 deletions
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
new file mode 100644
index 0000000..6034be3
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.183-implement-libc-specific-reopen_stream.patch
@@ -0,0 +1,24 @@
+diff --git a/lib/log/log.c b/lib/log/log.c
+index 79fbd7a..0999d10 100644
+--- a/lib/log/log.c
++++ b/lib/log/log.c
+@@ -161,6 +161,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_
+ * Close and reopen standard stream on file descriptor fd.
+ */
+ int reopen_standard_stream(FILE **stream, const char *mode)
++#ifdef __GLIBC__
+ {
+ int fd, fd_copy, new_fd;
+ const char *name;
+@@ -207,6 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode)
+ *stream = new_stream;
+ return 1;
+ }
++#else
++{
++ return (freopen(NULL, mode, *stream) != NULL);
++}
++#endif
+
+ void init_log_fn(lvm2_log_fn_t log_fn)
+ {
diff --git a/sys-fs/lvm2/lvm2-2.02.183.ebuild b/sys-fs/lvm2/lvm2-2.02.183.ebuild
index 9697b02..b3a7fb5 100644
--- a/sys-fs/lvm2/lvm2-2.02.183.ebuild
+++ b/sys-fs/lvm2/lvm2-2.02.183.ebuild
@@ -56,6 +56,7 @@ PATCHES=(
# Musl fixes
"${FILESDIR}"/${PN}-2.02.183-fix-stdio-usage.patch
"${FILESDIR}"/${PN}-2.02.183-portability.patch
+ "${FILESDIR}"/${PN}-2.02.183-implement-libc-specific-reopen_stream.patch
# For upstream -- review and forward:
"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch