summaryrefslogtreecommitdiff
path: root/package/lvm/patches/patch-tools_lvmcmdline_c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-29 17:58:20 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-29 17:58:51 +0200
commit014f5aac68d56ef7a29bcd07621b34992a0a3267 (patch)
tree6f7b7a92a91c0615f34924d22a6af1475a6d5995 /package/lvm/patches/patch-tools_lvmcmdline_c
parentbc4259ca5f7e21185db6566c1ef55f9e099c446c (diff)
fix musl compile, patch from sabotage linux
Diffstat (limited to 'package/lvm/patches/patch-tools_lvmcmdline_c')
-rw-r--r--package/lvm/patches/patch-tools_lvmcmdline_c34
1 files changed, 34 insertions, 0 deletions
diff --git a/package/lvm/patches/patch-tools_lvmcmdline_c b/package/lvm/patches/patch-tools_lvmcmdline_c
new file mode 100644
index 000000000..13124f32d
--- /dev/null
+++ b/package/lvm/patches/patch-tools_lvmcmdline_c
@@ -0,0 +1,34 @@
+--- LVM2.2.02.106.orig/tools/lvmcmdline.c 2014-04-10 17:38:46.000000000 +0200
++++ LVM2.2.02.106/tools/lvmcmdline.c 2014-05-29 16:57:14.221581766 +0200
+@@ -1252,9 +1252,12 @@ int lvm_split(char *str, int *argc, char
+ static int _check_standard_fds(void)
+ {
+ int err = is_valid_fd(STDERR_FILENO);
++ FILE *stdin_stream = stdin;
++ FILE *stdout_stream = stdout;
++ FILE *stderr_stream = stderr;
+
+ if (!is_valid_fd(STDIN_FILENO) &&
+- !(stdin = fopen(_PATH_DEVNULL, "r"))) {
++ !(stdin_stream = fopen(_PATH_DEVNULL, "r"))) {
+ if (err)
+ perror("stdin stream open");
+ else
+@@ -1264,7 +1267,7 @@ static int _check_standard_fds(void)
+ }
+
+ if (!is_valid_fd(STDOUT_FILENO) &&
+- !(stdout = fopen(_PATH_DEVNULL, "w"))) {
++ !(stdout_stream = fopen(_PATH_DEVNULL, "w"))) {
+ if (err)
+ perror("stdout stream open");
+ /* else no stdout */
+@@ -1272,7 +1275,7 @@ static int _check_standard_fds(void)
+ }
+
+ if (!is_valid_fd(STDERR_FILENO) &&
+- !(stderr = fopen(_PATH_DEVNULL, "w"))) {
++ !(stderr_stream = fopen(_PATH_DEVNULL, "w"))) {
+ printf("stderr stream open: %s\n",
+ strerror(errno));
+ return 0;