uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
53
pkgs/os-specific/linux/lvm2/fix-stdio-usage.patch
Normal file
53
pkgs/os-specific/linux/lvm2/fix-stdio-usage.patch
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
|
||||
index 296618686..96343eeb7 100644
|
||||
--- a/lib/commands/toolcontext.c
|
||||
+++ b/lib/commands/toolcontext.c
|
||||
@@ -1619,7 +1619,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd,
|
||||
/* 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
|
||||
#ifdef SYS_gettid
|
||||
@@ -2006,7 +2006,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
|
||||
|
||||
if (cmd->pending_delete_mem)
|
||||
dm_pool_destroy(cmd->pending_delete_mem);
|
||||
-#ifndef VALGRIND_POOL
|
||||
+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
|
||||
if (cmd->linebuffer) {
|
||||
/* Reset stream buffering to defaults */
|
||||
if (is_valid_fd(STDIN_FILENO) &&
|
||||
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
|
||||
index d97ff5720..bbbda82bd 100644
|
||||
--- a/tools/lvmcmdline.c
|
||||
+++ b/tools/lvmcmdline.c
|
||||
@@ -3342,7 +3342,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
|
||||
@@ -3352,7 +3352,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 */
|
||||
@@ -3360,7 +3360,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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue