Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (ea5f778346ec0a54426c6b4a410a29aa39d8a04e)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (ea5f778346ec0a54426c6b4a410a29aa39d8a04e)
  • Date: Sun, 14 Feb 2021 18:53:39 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

disk/lvm/HISTORY | 3 +
disk/lvm/patches/fix-stdio-usage.patch | 55
+++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+)

New commits:
commit ea5f778346ec0a54426c6b4a410a29aa39d8a04e
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

lvm: Fix build against musl

diff --git a/disk/lvm/HISTORY b/disk/lvm/HISTORY
index 06d7475..640af90 100644
--- a/disk/lvm/HISTORY
+++ b/disk/lvm/HISTORY
@@ -1,3 +1,6 @@
+2021-02-14 Ismael Luceno <ismael AT sourcemage.org>
+ * patches/fix-stdio-usage.patch: Fixed build against musl
+
2021-01-08 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* DETAILS: version 2.03.11
* patches/fix-stdio-usage.patch: remove obsolete patch
diff --git a/disk/lvm/patches/fix-stdio-usage.patch
b/disk/lvm/patches/fix-stdio-usage.patch
new file mode 100644
index 0000000..4e89eb6
--- /dev/null
+++ b/disk/lvm/patches/fix-stdio-usage.patch
@@ -0,0 +1,55 @@
+Source: Void-Linux
+
+diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
+index 95fb343..5baea40 100644
+--- a/lib/commands/toolcontext.c
++++ b/lib/commands/toolcontext.c
+@@ -1605,7 +1605,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
+@@ -1986,7 +1986,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 tools/lvmcmdline.c tools/lvmcmdline.c
+index 0840c65..9503922 100644
+--- a/tools/lvmcmdline.c
++++ b/tools/lvmcmdline.c
+@@ -3238,7 +3238,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
+@@ -3248,7 +3248,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 */
+@@ -3256,7 +3256,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;



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (ea5f778346ec0a54426c6b4a410a29aa39d8a04e), Ismael Luceno, 02/14/2021

Archive powered by MHonArc 2.6.24.

Top of Page