diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-06-15 03:40:39 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-06-15 03:40:39 +0200 |
commit | fd9286e46cdb1481af0120c48e9812b982150286 (patch) | |
tree | ab3340fb039b31029d884503a22a5ac39bece34e /patches | |
parent | open-iscsi: Allow building against gcc-10 (diff) | |
download | genkernel-fd9286e46cdb1481af0120c48e9812b982150286.tar.gz genkernel-fd9286e46cdb1481af0120c48e9812b982150286.tar.bz2 genkernel-fd9286e46cdb1481af0120c48e9812b982150286.zip |
lvm: Add patch to allow building on musl
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/lvm/2.02.187/lvm2-016-implement-libc-specific-reopen_stream.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/lvm/2.02.187/lvm2-016-implement-libc-specific-reopen_stream.patch b/patches/lvm/2.02.187/lvm2-016-implement-libc-specific-reopen_stream.patch new file mode 100644 index 0000000..6034be3 --- /dev/null +++ b/patches/lvm/2.02.187/lvm2-016-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) + { |