[glib] gio/gtestdbus.c: don't use non-standard %m printf modifier



commit 0d0db609590307ecae03627ac55265597d4a0ca0
Author: Tobias Nygren <tnn NetBSD org>
Date:   Fri Oct 16 18:46:26 2015 +0200

    gio/gtestdbus.c: don't use non-standard %m printf modifier
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756706

 gio/gtestdbus.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c
index 295c1ea..588bcfa 100644
--- a/gio/gtestdbus.c
+++ b/gio/gtestdbus.c
@@ -24,6 +24,8 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <errno.h>
+#include <string.h>
 #include <gstdio.h>
 #ifdef G_OS_UNIX
 #include <unistd.h>
@@ -243,14 +245,14 @@ watcher_init (void)
       /* fork a child to clean up when we are killed */
       if (pipe (pipe_fds) != 0)
         {
-          g_warning ("pipe() failed: %m");
+          g_warning ("pipe() failed: %s", strerror (errno));
           g_assert_not_reached ();
         }
 
       switch (fork ())
         {
         case -1:
-          g_warning ("fork() failed: %m");
+          g_warning ("fork() failed: %s", strerror (errno));
           g_assert_not_reached ();
           break;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]