diff options
Diffstat (limited to 'sys-fs/lvm2/files/lvm2-2.03.14-r1-fopen-to-freopen.patch')
-rw-r--r-- | sys-fs/lvm2/files/lvm2-2.03.14-r1-fopen-to-freopen.patch | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/sys-fs/lvm2/files/lvm2-2.03.14-r1-fopen-to-freopen.patch b/sys-fs/lvm2/files/lvm2-2.03.14-r1-fopen-to-freopen.patch deleted file mode 100644 index 56248e10e5d6..000000000000 --- a/sys-fs/lvm2/files/lvm2-2.03.14-r1-fopen-to-freopen.patch +++ /dev/null @@ -1,43 +0,0 @@ -In musl stdout, stdin and stderr are read-only unlike in glibc. -This patch changes std* = fopen(...) to freopen(..., std*). - -See: https://www.gnu.org/software/libc/manual/html_node/Standard-Streams.html and https://wiki.gentoo.org/wiki/User:Sam/Musl_porting_notes - ---- - tools/lvmcmdline.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c -index 1e12bed..19da1e5 100644 ---- a/tools/lvmcmdline.c -+++ b/tools/lvmcmdline.c -@@ -3384,7 +3384,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 -@@ -3394,7 +3394,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 */ -@@ -3402,7 +3402,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.35.1 - |