diff options
author | David Seifert <soap@gentoo.org> | 2023-03-07 15:20:43 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2023-03-07 15:20:43 +0100 |
commit | d31a213d16d4c516cc1ee5ef5535b964ee15467a (patch) | |
tree | 27b6cc69f66f8f3b6acbf36d964e9fcb85cdfc9c /sys-fs/lvm2/files | |
parent | dev-python/jupyter_ydoc: add 0.3.4 (diff) | |
download | gentoo-d31a213d16d4c516cc1ee5ef5535b964ee15467a.tar.gz gentoo-d31a213d16d4c516cc1ee5ef5535b964ee15467a.tar.bz2 gentoo-d31a213d16d4c516cc1ee5ef5535b964ee15467a.zip |
sys-fs/lvm2: drop 2.03.18-r1
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sys-fs/lvm2/files')
-rw-r--r-- | sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch | 63 |
1 files changed, 0 insertions, 63 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 deleted file mode 100644 index 94fb99e04025..000000000000 --- a/sys-fs/lvm2/files/lvm2-2.03.18-freopen-musl.patch +++ /dev/null @@ -1,63 +0,0 @@ -From a2b9c9d2fe4d3f3869e8748dd44da44b67ba5a66 Mon Sep 17 00:00:00 2001 -From: David Seifert <soap@gentoo.org> -Date: Sat, 28 Jan 2023 14:22:42 +0100 -Subject: [PATCH] Use `freopen()` on {stdin,stdout,stderr} - -* ISO C does not guarantee that the standard streams are modifiable - 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 | 4 ++++ - tools/lvmcmdline.c | 6 +++--- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/lib/log/log.c b/lib/log/log.c -index 118a3ba42..a94016d81 100644 ---- a/lib/log/log.c -+++ b/lib/log/log.c -@@ -208,7 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode) - - _check_and_replace_standard_log_streams(old_stream, new_stream); - -+#ifdef __GLIBC__ - *stream = new_stream; -+#else -+ freopen(NULL, mode, *stream); -+#endif - return 1; - } - -diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c -index a5bb6a5c5..0ebfa375c 100644 ---- a/tools/lvmcmdline.c -+++ b/tools/lvmcmdline.c -@@ -3422,7 +3422,7 @@ static int _check_standard_fds(void) - int err = is_valid_fd(STDERR_FILENO); - - if (!is_valid_fd(STDIN_FILENO) && -- !(stdin = fopen(_PATH_DEVNULL, "r"))) { -+ !freopen(_PATH_DEVNULL, "r", stdin)) { - if (err) - perror("stdin stream open"); - else -@@ -3432,7 +3432,7 @@ static int _check_standard_fds(void) - } - - if (!is_valid_fd(STDOUT_FILENO) && -- !(stdout = fopen(_PATH_DEVNULL, "w"))) { -+ !freopen(_PATH_DEVNULL, "w", stdout)) { - if (err) - perror("stdout stream open"); - /* else no stdout */ -@@ -3440,7 +3440,7 @@ static int _check_standard_fds(void) - } - - if (!is_valid_fd(STDERR_FILENO) && -- !(stderr = fopen(_PATH_DEVNULL, "w"))) { -+ !freopen(_PATH_DEVNULL, "w", stderr)) { - printf("stderr stream open: %s\n", - strerror(errno)); - return 0; --- -2.39.1 - |