diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-06-14 02:22:19 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-06-14 02:22:56 -0500 |
commit | b1eb50599e4db7eb4501af75cbbfa22007081ea5 (patch) | |
tree | c94a34c882cc17adedd781e8c5f34349b2a62416 /system/lvm2/fix-stdio-usage.patch | |
parent | b9e85bbdcf38547ef2ca4e5c2a6e6293bbcd2752 (diff) | |
download | packages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.tar.gz packages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.tar.bz2 packages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.tar.xz packages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.zip |
The New Plan
all pkgs needed to bootstrap -> system
others -> user
Diffstat (limited to 'system/lvm2/fix-stdio-usage.patch')
-rw-r--r-- | system/lvm2/fix-stdio-usage.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/system/lvm2/fix-stdio-usage.patch b/system/lvm2/fix-stdio-usage.patch new file mode 100644 index 000000000..39ba2e1b4 --- /dev/null +++ b/system/lvm2/fix-stdio-usage.patch @@ -0,0 +1,49 @@ +--- ./tools/lvmcmdline.c ++++ ./tools/lvmcmdline.c +@@ -1252,7 +1252,7 @@ + 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 +@@ -1262,7 +1262,7 @@ + } + + 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 */ +@@ -1270,7 +1270,7 @@ + } + + 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; +--- ./lib/commands/toolcontext.c.orig ++++ ./lib/commands/toolcontext.c +@@ -1860,7 +1860,7 @@ + /* FIXME Make this configurable? */ + reset_lvm_errno(1); + +-#ifndef VALGRIND_POOL ++#if !defined(VALGRIND_POOL) && defined(__GLIBC__) + /* Set in/out stream buffering before glibc */ + if (set_buffering) { + /* Allocate 2 buffers */ +@@ -2241,7 +2241,7 @@ + if (cmd->libmem) + dm_pool_destroy(cmd->libmem); + +-#ifndef VALGRIND_POOL ++#if !defined(VALGRIND_POOL) && defined(__GLIBC__) + if (cmd->linebuffer) { + /* Reset stream buffering to defaults */ + if (is_valid_fd(STDIN_FILENO) && |