---
 gisi/netlink.c |    8 ++++++--
 gisi/server.c  |   11 ++++++++---
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/gisi/netlink.c b/gisi/netlink.c
index 44a4a8d..dcc322c 100644
--- a/gisi/netlink.c
+++ b/gisi/netlink.c
@@ -240,8 +240,12 @@ static gboolean g_pn_nl_process(GIOChannel *channel, 
GIOCondition cond,
                case NLMSG_ERROR: {
                        struct nlmsgerr *err = NLMSG_DATA(nlh);
                        if (err->error)
-                               g_printerr("Netlink error: %s",
-                                               strerror(-err->error));
+                       {
+                               char msg[256];
+
+                               strerror_r(-err->error, msg, sizeof(msg));
+                               g_printerr("Netlink error: %s", msg);
+                       }
                        return TRUE;
                }
                case RTM_NEWADDR:
diff --git a/gisi/server.c b/gisi/server.c
index 159bb2d..df2e4eb 100644
--- a/gisi/server.c
+++ b/gisi/server.c
@@ -157,7 +157,10 @@ g_isi_server_add_name(GIsiServer *self)
                return;
 
        if (ioctl(self->fd, SIOCPNGETOBJECT, &object) < 0) {
-               g_warning("%s: %s", "ioctl(SIOCPNGETOBJECT)", strerror(errno));
+               char msg[256];
+
+               strerror_r(errno, msg, sizeof(msg));
+               g_warning("%s: %s", "ioctl(SIOCPNGETOBJECT)", msg);
        } else {
                struct sockaddr_pn spn = {
                        .spn_family = PF_PHONET,
@@ -173,8 +176,10 @@ g_isi_server_add_name(GIsiServer *self)
 
                if (sendto(self->fd, req, sizeof(req), 0,
                                (void *)&spn, sizeof(spn)) != sizeof(req)) {
-                       g_warning("%s: %s", "sendto(PN_NAMESERVICE)",
-                                 strerror(errno));
+                       char msg[256];
+
+                       strerror_r(errno, msg, sizeof(msg));
+                       g_warning("%s: %s", "sendto(PN_NAMESERVICE)", msg);
                }
        }
 }
-- 
1.7.1

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to