All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: buildroot@buildroot.org
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: [Buildroot] [PATCH 1/1] package/libblockdev: fix build with libglib2 >= 2.69
Date: Wed,  2 Feb 2022 00:08:45 +0100	[thread overview]
Message-ID: <20220201230845.888962-1-fontaine.fabrice@gmail.com> (raw)

Fix the following build failure raised since bump of libglib2 to version
2.70 in commit 079923d5fabf4f887bb140808cb16067ca08b19b:

exec.c: In function 'bd_utils_exec_and_report_status_error':
exec.c:239:5: error: 'g_spawn_check_exit_status' is deprecated: Use 'g_spawn_check_wait_status' instead [-Werror=deprecated-declarations]
  239 |     if (!g_spawn_check_exit_status (exit_status, error)) {
      |     ^~

Fixes:
 - http://autobuild.buildroot.org/results/8f9ca895cb07014804130a7ccbcb758b1d519470

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...ec-Fix-deprecated-glib-function-call.patch | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 package/libblockdev/0002-exec-Fix-deprecated-glib-function-call.patch

diff --git a/package/libblockdev/0002-exec-Fix-deprecated-glib-function-call.patch b/package/libblockdev/0002-exec-Fix-deprecated-glib-function-call.patch
new file mode 100644
index 0000000000..2c370a133f
--- /dev/null
+++ b/package/libblockdev/0002-exec-Fix-deprecated-glib-function-call.patch
@@ -0,0 +1,32 @@
+From aad927a81fd9067865dc391c5bbff12ac51a0002 Mon Sep 17 00:00:00 2001
+From: Manuel Wassermann <manuel.wassermann97@gmail.com>
+Date: Thu, 1 Jul 2021 04:45:49 +0200
+Subject: [PATCH] exec: Fix deprecated glib function call Glib will rename
+ "g_spawn_check_exit_status()" to "g_spawn_check_wait_status()" in version
+ 2.69.
+
+[Retrieved from:
+https://github.com/storaged-project/libblockdev/commit/aad927a81fd9067865dc391c5bbff12ac51a0002]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ src/utils/exec.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/utils/exec.c b/src/utils/exec.c
+index 317fb5525..8faeb289c 100644
+--- a/src/utils/exec.c
++++ b/src/utils/exec.c
+@@ -236,7 +236,12 @@ gboolean bd_utils_exec_and_report_status_error (const gchar **argv, const BDExtr
+     /* g_spawn_sync set the status in the same way waitpid() does, we need
+        to get the process exit code manually (this is similar to calling
+        WEXITSTATUS but also sets the error for terminated processes */
+-    if (!g_spawn_check_exit_status (exit_status, error)) {
++
++    #if !GLIB_CHECK_VERSION(2, 69, 0)
++    #define g_spawn_check_wait_status(x,y) (g_spawn_check_exit_status (x,y))
++    #endif
++
++    if (!g_spawn_check_wait_status (exit_status, error)) {
+         if (g_error_matches (*error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED)) {
+             /* process was terminated abnormally (e.g. using a signal) */
+             g_free (stdout_data);
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2022-02-01 23:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 23:08 Fabrice Fontaine [this message]
2022-02-03 11:05 ` [Buildroot] [PATCH 1/1] package/libblockdev: fix build with libglib2 >= 2.69 Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220201230845.888962-1-fontaine.fabrice@gmail.com \
    --to=fontaine.fabrice@gmail.com \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.