diff --git a/ChangeLog b/ChangeLog
index 839e94c..39e7458 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+	* global: Replace strerror with safe_strerror.  And vtysh/vtysh.c
+	  needs to include "log.h" to pick up the declaration.
+
 2004-11-19 Hasso Tepper <hasso at quagga.net>
 
 	* configure.ac: Avoid regeneration of doc/quagga.info for now.
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 84311e2..7dcddb7 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -65,7 +65,7 @@
   bgp_sock = sockunion_accept (accept_sock, &su);
   if (bgp_sock < 0)
     {
-      zlog_err ("[Error] BGP socket accept failed (%s)", strerror (errno));
+      zlog_err ("[Error] BGP socket accept failed (%s)", safe_strerror (errno));
       return -1;
     }
 
@@ -318,7 +318,7 @@
       sock = socket (ainfo->ai_family, ainfo->ai_socktype, ainfo->ai_protocol);
       if (sock < 0)
 	{
-	  zlog_err ("socket: %s", strerror (errno));
+	  zlog_err ("socket: %s", safe_strerror (errno));
 	  continue;
 	}
 
@@ -335,7 +335,7 @@
 
       if (ret < 0)
 	{
-	  zlog_err ("bind: %s", strerror (en));
+	  zlog_err ("bind: %s", safe_strerror (en));
 	  close(sock);
 	  continue;
 	}
@@ -343,7 +343,7 @@
       ret = listen (sock, 3);
       if (ret < 0) 
 	{
-	  zlog_err ("listen: %s", strerror (errno));
+	  zlog_err ("listen: %s", safe_strerror (errno));
 	  close (sock);
 	  continue;
 	}
@@ -369,7 +369,7 @@
   sock = socket (AF_INET, SOCK_STREAM, 0);
   if (sock < 0)
     {
-      zlog_err ("socket: %s", strerror (errno));
+      zlog_err ("socket: %s", safe_strerror (errno));
       return sock;
     }
 
@@ -396,7 +396,7 @@
 
   if (ret < 0)
     {
-      zlog_err ("bind: %s", strerror (en));
+      zlog_err ("bind: %s", safe_strerror (en));
       close (sock);
       return ret;
     }
@@ -404,7 +404,7 @@
   ret = listen (sock, 3);
   if (ret < 0) 
     {
-      zlog_err ("listen: %s", strerror (errno));
+      zlog_err ("listen: %s", safe_strerror (errno));
       close (sock);
       return ret;
     }
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index dc5d369..8acc98e 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -152,7 +152,7 @@
     {
       if (BGP_DEBUG (events, EVENTS))
 	  plog_info (peer->log, "%s [Event] Connect failed (%s)",
-		     peer->host, strerror (errno));
+		     peer->host, safe_strerror (errno));
       BGP_EVENT_ADD (peer, TCP_connection_open_failed);
     }
 }
@@ -2115,7 +2115,7 @@
 	return -1;
 
       plog_err (peer->log, "%s [Error] bgp_read_packet error: %s",
-		 peer->host, strerror (errno));
+		 peer->host, safe_strerror (errno));
       BGP_EVENT_ADD (peer, TCP_fatal_error);
       return -1;
     }  
diff --git a/isisd/isis_network.c b/isisd/isis_network.c
index 4fbf16f..a1dc582 100644
--- a/isisd/isis_network.c
+++ b/isisd/isis_network.c
@@ -130,7 +130,7 @@
   if (setsockopt (fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &mreq,
 		  sizeof (struct packet_mreq)))
     {
-      zlog_warn ("isis_multicast_join(): setsockopt(): %s", strerror (errno));
+      zlog_warn ("isis_multicast_join(): setsockopt(): %s", safe_strerror (errno));
       return ISIS_WARNING;
     }
 
@@ -147,7 +147,7 @@
   if (fd < 0)
     {
       zlog_warn ("open_packet_socket(): socket() failed %s",
-		 strerror (errno));
+		 safe_strerror (errno));
       return ISIS_WARNING;
     }
 
@@ -162,7 +162,7 @@
   if (bind (fd, (struct sockaddr *) (&s_addr),
 	    sizeof (struct sockaddr_ll)) < 0)
     {
-      zlog_warn ("open_packet_socket(): bind() failed: %s", strerror (errno));
+      zlog_warn ("open_packet_socket(): bind() failed: %s", safe_strerror (errno));
       return ISIS_WARNING;
     }
 
@@ -222,7 +222,7 @@
   if (fd < 0)
     {
       zlog_warn ("open_bpf_dev(): failed to create bpf socket: %s",
-		 strerror (errno));
+		 safe_strerror (errno));
       return ISIS_WARNING;
     }
 
@@ -232,7 +232,7 @@
   if (ioctl (fd, BIOCSETIF, (caddr_t) & ifr) < 0)
     {
       zlog_warn ("open_bpf_dev(): failed to bind to interface: %s",
-		 strerror (errno));
+		 safe_strerror (errno));
       return ISIS_WARNING;
     }
 
@@ -307,7 +307,7 @@
   if (ioctl (fd, BIOCSETF, (caddr_t) & bpf_prog) < 0)
     {
       zlog_warn ("open_bpf_dev(): failed to install filter: %s",
-		 strerror (errno));
+		 safe_strerror (errno));
       return ISIS_WARNING;
     }
 
@@ -329,7 +329,7 @@
   int retval = ISIS_OK;
 
   if (isisd_privs.change (ZPRIVS_RAISE))
-    zlog_err ("%s: could not raise privs, %s", __func__, strerror (errno));
+    zlog_err ("%s: could not raise privs, %s", __func__, safe_strerror (errno));
 
 #ifdef GNU_LINUX
   retval = open_packet_socket (circuit);
@@ -362,7 +362,7 @@
 
 end:
   if (isisd_privs.change (ZPRIVS_LOWER))
-    zlog_err ("%s: could not lower privs, %s", __func__, strerror (errno));
+    zlog_err ("%s: could not lower privs, %s", __func__, safe_strerror (errno));
 
   return retval;
 }
@@ -395,7 +395,7 @@
   if (bytesread < 0)
     {
       zlog_warn ("isis_recv_packet_bcast(): fd %d, recvfrom (): %s",
-		 circuit->fd, strerror (errno));
+		 circuit->fd, safe_strerror (errno));
       zlog_warn ("circuit is %s", circuit->interface->name);
       zlog_warn ("circuit fd %d", circuit->fd);
       zlog_warn ("bytesread %d", bytesread);
@@ -549,7 +549,7 @@
 
   if (ioctl (circuit->fd, FIONREAD, (caddr_t) & bytestoread) < 0)
     {
-      zlog_warn ("ioctl() FIONREAD failed: %s", strerror (errno));
+      zlog_warn ("ioctl() FIONREAD failed: %s", safe_strerror (errno));
     }
 
   if (bytestoread)
@@ -559,7 +559,7 @@
   if (bytesread < 0)
     {
       zlog_warn ("isis_recv_pdu_bcast(): read() failed: %s",
-		 strerror (errno));
+		 safe_strerror (errno));
       return ISIS_WARNING;
     }
 
@@ -584,7 +584,7 @@
 	  ETHER_ADDR_LEN);
 
   if (ioctl (circuit->fd, BIOCFLUSH, &one) < 0)
-    zlog_warn ("Flushing failed: %s", strerror (errno));
+    zlog_warn ("Flushing failed: %s", safe_strerror (errno));
 
   return ISIS_OK;
 }
@@ -599,7 +599,7 @@
 
   if (bytesread < 0)
     {
-      zlog_warn ("isis_recv_pdu_p2p(): read () failed: %s", strerror (errno));
+      zlog_warn ("isis_recv_pdu_p2p(): read () failed: %s", safe_strerror (errno));
       return ISIS_WARNING;
     }
 
diff --git a/isisd/modified/thread.c b/isisd/modified/thread.c
index af954b8..8364c4d 100644
--- a/isisd/modified/thread.c
+++ b/isisd/modified/thread.c
@@ -611,7 +611,7 @@
 	  if (errno == EINTR)
 	    continue;
 
-	  zlog_warn ("select() error: %s", strerror (errno));
+	  zlog_warn ("select() error: %s", safe_strerror (errno));
 	  return NULL;
 	}
 
diff --git a/isisd/modified/vty.c b/isisd/modified/vty.c
index 6de0e0d..2a1f466 100644
--- a/isisd/modified/vty.c
+++ b/isisd/modified/vty.c
@@ -1638,7 +1638,7 @@
   vty_sock = sockunion_accept (accept_sock, &su);
   if (vty_sock < 0)
     {
-      zlog_warn ("can't accept vty socket : %s", strerror (errno));
+      zlog_warn ("can't accept vty socket : %s", safe_strerror (errno));
       return -1;
     }
 
@@ -1695,7 +1695,7 @@
 		    (char *) &on, sizeof (on));
   if (ret < 0)
     zlog (NULL, LOG_INFO, "can't set sockopt to vty_sock : %s", 
-	  strerror (errno));
+	  safe_strerror (errno));
 
   vty = vty_create (vty_sock, &su);
 
@@ -1889,7 +1889,7 @@
 
   if (sock < 0)
     {
-      zlog_warn ("can't accept vty socket : %s", strerror (errno));
+      zlog_warn ("can't accept vty socket : %s", safe_strerror (errno));
       return -1;
     }
 
diff --git a/lib/buffer.c b/lib/buffer.c
index 3701e12..296fd14 100644
--- a/lib/buffer.c
+++ b/lib/buffer.c
@@ -598,7 +598,7 @@
     {
       if ((errno != EAGAIN) && (errno != EINTR))
         zlog_warn("buffer_flush_available write error on fd %d: %s",
-		  fd,strerror(errno));
+		  fd,safe_strerror(errno));
       return 1;
     }
 
diff --git a/lib/command.c b/lib/command.c
index fc115d9..6c02c96 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2562,7 +2562,7 @@
   if (chmod (config_file, CONFIGFILE_MASK) != 0)
     {
       vty_out (vty, "Can't chmod configuration file %s: %s (%d).%s", 
-	config_file, strerror(errno), errno, VTY_NEWLINE);
+	config_file, safe_strerror(errno), errno, VTY_NEWLINE);
       return CMD_WARNING;      
     }
 
diff --git a/lib/memory.c b/lib/memory.c
index a5c327d..6eb135f 100644
--- a/lib/memory.c
+++ b/lib/memory.c
@@ -44,7 +44,7 @@
 zerror (const char *fname, int type, size_t size)
 {
   zlog_err ("%s : can't allocate memory for `%s' size %d: %s\n", 
-	    fname, lookup (mstr, type), (int) size, strerror(errno));
+	    fname, lookup (mstr, type), (int) size, safe_strerror(errno));
   log_memstats(LOG_WARNING);
   abort();
 }
diff --git a/lib/pid_output.c b/lib/pid_output.c
index fca7ec8..2782b9d 100644
--- a/lib/pid_output.c
+++ b/lib/pid_output.c
@@ -71,7 +71,7 @@
       if (fd < 0)
         {
         zlog_err( "Can't creat pid lock file %s (%s), exit", 
-                 path, strerror(errno));
+                 path, safe_strerror(errno));
       umask(oldumask);
       exit (-1);
     }
diff --git a/lib/privs.c b/lib/privs.c
index 71e2c7f..66681da 100644
--- a/lib/privs.c
+++ b/lib/privs.c
@@ -128,7 +128,7 @@
       if ( cap_get_flag (zprivs_state.caps, zprivs_state.syscaps_p[i], 
                          CAP_EFFECTIVE, &val) )
         zlog_warn ("zprivs_state_caps: could not cap_get_flag, %s",
-                    strerror (errno) );
+                    safe_strerror (errno) );
       if (val == CAP_SET)
         return ZPRIVS_RAISED;
     }
@@ -215,7 +215,7 @@
           if ( setgroups (1, &zprivs_state.vtygrp) )
             {
               fprintf (stderr, "privs_init: could not setgroups, %s\n",
-                         strerror (errno) );
+                         safe_strerror (errno) );
               exit (1);
             }       
         }
@@ -243,7 +243,7 @@
       if ( setregid (zprivs_state.zgid, zprivs_state.zgid) )
         {
           fprintf (stderr, "zprivs_init: could not setregid, %s\n",
-                    strerror (errno) );
+                    safe_strerror (errno) );
           exit (1);
         }
     }
@@ -258,7 +258,7 @@
   if ( prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) == -1 )
     {
       fprintf (stderr, "privs_init: could not set PR_SET_KEEPCAPS, %s\n",
-                strerror (errno) );
+                safe_strerror (errno) );
       exit(1);
     }
 
@@ -270,7 +270,7 @@
   if ( !(zprivs_state.caps = cap_init()) )
     {
       fprintf (stderr, "privs_init: failed to cap_init, %s\n", 
-               strerror (errno));
+               safe_strerror (errno));
       exit (1);
     }
 
@@ -280,7 +280,7 @@
       if ( setreuid (zprivs_state.zuid, zprivs_state.zuid) )
         {
           fprintf (stderr, "zprivs_init (cap): could not setreuid, %s\n", 
-                     strerror (errno));
+                     safe_strerror (errno));
           exit (1);
         }
     }
@@ -288,7 +288,7 @@
   if ( cap_clear (zprivs_state.caps) )
     {
       fprintf (stderr, "privs_init: failed to cap_clear, %s\n", 
-               strerror (errno));
+               safe_strerror (errno));
       exit (1);
     }
   
@@ -329,7 +329,7 @@
       if ( setreuid (-1, zprivs_state.zuid) )
         {
           fprintf (stderr, "privs_init (uid): could not setreuid, %s\n", 
-                   strerror (errno));
+                   safe_strerror (errno));
           exit (1);
         }
     }
@@ -351,7 +351,7 @@
   if ( cap_set_proc (zprivs_state.caps) ) 
     {
       zlog_err ("privs_terminate: cap_set_proc failed, %s",
-                strerror (errno) );
+                safe_strerror (errno) );
       exit (1);
     }  
 
@@ -368,7 +368,7 @@
       if ( setreuid (zprivs_state.zuid, zprivs_state.zuid) )
         {
           zlog_err ("privs_terminate: could not setreuid, %s", 
-                     strerror (errno) );
+                     safe_strerror (errno) );
           exit (1);
         }
      }
diff --git a/lib/smux.c b/lib/smux.c
index 2578609..33efccd 100644
--- a/lib/smux.c
+++ b/lib/smux.c
@@ -904,7 +904,7 @@
 
   if (len < 0)
     {
-      zlog_warn ("Can't read all SMUX packet: %s", strerror (errno));
+      zlog_warn ("Can't read all SMUX packet: %s", safe_strerror (errno));
       close (sock);
       smux_sock = -1;
       smux_event (SMUX_CONNECT, 0);
@@ -1181,7 +1181,7 @@
   ret = smux_open (smux_sock);
   if (ret < 0)
     {
-      zlog_warn ("SMUX open message send failed: %s", strerror (errno));
+      zlog_warn ("SMUX open message send failed: %s", safe_strerror (errno));
       close (smux_sock);
       smux_sock = -1;
       if (++fail < SMUX_MAX_FAILURE)
@@ -1193,7 +1193,7 @@
   ret = smux_register (smux_sock);
   if (ret < 0)
     {
-      zlog_warn ("SMUX register message send failed: %s", strerror (errno));
+      zlog_warn ("SMUX register message send failed: %s", safe_strerror (errno));
       close (smux_sock);
       smux_sock = -1;
       if (++fail < SMUX_MAX_FAILURE)
diff --git a/lib/sockopt.c b/lib/sockopt.c
index 2afa3c8..786e152 100644
--- a/lib/sockopt.c
+++ b/lib/sockopt.c
@@ -61,11 +61,11 @@
 #ifdef IPV6_RECVPKTINFO		/*2292bis-01*/
   ret = setsockopt(sock, IPPROTO_IPV6, IPV6_RECVPKTINFO, &val, sizeof(val));
   if (ret < 0)
-    zlog_warn ("can't setsockopt IPV6_RECVPKTINFO : %s", strerror (errno));
+    zlog_warn ("can't setsockopt IPV6_RECVPKTINFO : %s", safe_strerror (errno));
 #else	/*RFC2292*/
   ret = setsockopt(sock, IPPROTO_IPV6, IPV6_PKTINFO, &val, sizeof(val));
   if (ret < 0)
-    zlog_warn ("can't setsockopt IPV6_PKTINFO : %s", strerror (errno));
+    zlog_warn ("can't setsockopt IPV6_PKTINFO : %s", safe_strerror (errno));
 #endif /* INIA_IPV6 */
   return ret;
 }
diff --git a/lib/sockunion.c b/lib/sockunion.c
index 78e02f2..7157b49 100644
--- a/lib/sockunion.c
+++ b/lib/sockunion.c
@@ -236,7 +236,7 @@
   sock = socket (su->sa.sa_family, SOCK_STREAM, 0);
   if (sock < 0)
     {
-      zlog (NULL, LOG_WARNING, "Can't make socket : %s", strerror (errno));
+      zlog (NULL, LOG_WARNING, "Can't make socket : %s", safe_strerror (errno));
       return -1;
     }
 
@@ -377,7 +377,7 @@
       if (errno != EINPROGRESS)
 	{
 	  zlog_info ("can't connect to %s fd %d : %s",
-		     sockunion_log (&su), fd, strerror (errno));
+		     sockunion_log (&su), fd, safe_strerror (errno));
 	  return connect_error;
 	}
     }
@@ -444,7 +444,7 @@
 
   ret = bind (sock, (struct sockaddr *)su, size);
   if (ret < 0)
-    zlog (NULL, LOG_WARNING, "can't bind socket : %s", strerror (errno));
+    zlog (NULL, LOG_WARNING, "can't bind socket : %s", safe_strerror (errno));
 
   return ret;
 }
@@ -576,7 +576,7 @@
   if (ret < 0)
     {
       zlog_warn ("Can't get local address and port by getsockname: %s",
-		 strerror (errno));
+		 safe_strerror (errno));
       return NULL;
     }
 
@@ -630,7 +630,7 @@
   if (ret < 0)
     {
       zlog (NULL, LOG_WARNING, "Can't get remote address and port: %s",
-	    strerror (errno));
+	    safe_strerror (errno));
       return NULL;
     }
 
diff --git a/lib/thread.c b/lib/thread.c
index 09d6ff7..89df06a 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -791,7 +791,7 @@
               continue;
             }
 
-          zlog_warn ("select() error: %s", strerror (errno));
+          zlog_warn ("select() error: %s", safe_strerror (errno));
             return NULL;
         }
 
diff --git a/lib/vty.c b/lib/vty.c
index 3e10a94..016e52a 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -1598,7 +1598,7 @@
   vty_sock = sockunion_accept (accept_sock, &su);
   if (vty_sock < 0)
     {
-      zlog_warn ("can't accept vty socket : %s", strerror (errno));
+      zlog_warn ("can't accept vty socket : %s", safe_strerror (errno));
       return -1;
     }
 
@@ -1655,7 +1655,7 @@
 		    (char *) &on, sizeof (on));
   if (ret < 0)
     zlog (NULL, LOG_INFO, "can't set sockopt to vty_sock : %s", 
-	  strerror (errno));
+	  safe_strerror (errno));
 
   vty = vty_create (vty_sock, &su);
 
@@ -1758,7 +1758,7 @@
 	naddr=NULL;
 	break;
       case 0:
-        zlog_err("error translating address %s: %s",addr,strerror(errno));
+        zlog_err("error translating address %s: %s",addr,safe_strerror(errno));
 	naddr=NULL;
     }
 
@@ -1857,7 +1857,7 @@
       if ( chown (path, -1, ids.gid_vty) )
         {
           zlog_err ("vty_serv_un: could chown socket, %s",
-                     strerror (errno) );
+                     safe_strerror (errno) );
         }
     }
 
@@ -1888,7 +1888,7 @@
 
   if (sock < 0)
     {
-      zlog_warn ("can't accept vty socket : %s", strerror (errno));
+      zlog_warn ("can't accept vty socket : %s", safe_strerror (errno));
       return -1;
     }
 
@@ -1897,7 +1897,7 @@
       || (fcntl (sock, F_SETFL, flags|O_NONBLOCK) == -1) )
     {
       zlog_warn ("vtysh_accept: could not set vty socket to non-blocking,"
-                 " %s, closing", strerror (errno));
+                 " %s, closing", safe_strerror (errno));
       close (sock);
       return -1;
     }
diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c
index d6356c7..48f79af 100644
--- a/ospf6d/ospf6_lsa.c
+++ b/ospf6d/ospf6_lsa.c
@@ -179,7 +179,7 @@
 
   if (gettimeofday (&now, (struct timezone *)NULL) < 0)
     zlog_warn ("LSA: gettimeofday failed, may fail LSA AGEs: %s",
-               strerror (errno));
+               safe_strerror (errno));
 
   lsa->birth.tv_sec = now.tv_sec - ntohs (lsa->header->age);
   lsa->birth.tv_usec = now.tv_usec;
@@ -202,7 +202,7 @@
   /* current time */
   if (gettimeofday (&now, (struct timezone *)NULL) < 0)
     zlog_warn ("LSA: gettimeofday failed, may fail LSA AGEs: %s",
-               strerror (errno));
+               safe_strerror (errno));
 
   /* calculate age */
   ulage = now.tv_sec - lsa->birth.tv_sec;
diff --git a/ospf6d/ospf6_network.c b/ospf6d/ospf6_network.c
index de0c3f3..382310f 100644
--- a/ospf6d/ospf6_network.c
+++ b/ospf6d/ospf6_network.c
@@ -43,7 +43,7 @@
   u_int on = 0;
   if (setsockopt (ospf6_sock, SOL_SOCKET, SO_REUSEADDR, &on,
                   sizeof (u_int)) < 0)
-    zlog_warn ("Network: set SO_REUSEADDR failed: %s", strerror (errno));
+    zlog_warn ("Network: set SO_REUSEADDR failed: %s", safe_strerror (errno));
 }
 
 /* setsockopt MulticastLoop to off */
@@ -54,7 +54,7 @@
   if (setsockopt (ospf6_sock, IPPROTO_IPV6, IPV6_MULTICAST_LOOP,
                   &off, sizeof (u_int)) < 0)
     zlog_warn ("Network: reset IPV6_MULTICAST_LOOP failed: %s",
-               strerror (errno));
+               safe_strerror (errno));
 }
 
 void
@@ -70,7 +70,7 @@
 #ifndef DISABLE_IPV6_CHECKSUM
   if (setsockopt (ospf6_sock, IPPROTO_IPV6, IPV6_CHECKSUM,
                   &offset, sizeof (offset)) < 0)
-    zlog_warn ("Network: set IPV6_CHECKSUM failed: %s", strerror (errno));
+    zlog_warn ("Network: set IPV6_CHECKSUM failed: %s", safe_strerror (errno));
 #else
   zlog_warn ("Network: Don't set IPV6_CHECKSUM");
 #endif /* DISABLE_IPV6_CHECKSUM */
@@ -127,7 +127,7 @@
 
   if (retval < 0)
     zlog_err ("Network: Join AllSPFRouters on ifindex %d failed: %s",
-              ifindex, strerror (errno));
+              ifindex, safe_strerror (errno));
 #if 0
   else
     zlog_info ("Network: Join AllSPFRouters on ifindex %d", ifindex);
@@ -147,7 +147,7 @@
   if (setsockopt (ospf6_sock, IPPROTO_IPV6, IPV6_LEAVE_GROUP,
                   &mreq6, sizeof (mreq6)) < 0)
     zlog_warn ("Network: Leave AllSPFRouters on ifindex %d Failed: %s",
-               ifindex, strerror (errno));
+               ifindex, safe_strerror (errno));
 #if 0
   else
     zlog_info ("Network: Leave AllSPFRouters on ifindex %d", ifindex);
@@ -167,7 +167,7 @@
   if (setsockopt (ospf6_sock, IPPROTO_IPV6, IPV6_JOIN_GROUP,
                   &mreq6, sizeof (mreq6)) < 0)
     zlog_warn ("Network: Join AllDRouters on ifindex %d Failed: %s",
-               ifindex, strerror (errno));
+               ifindex, safe_strerror (errno));
 #if 0
   else
     zlog_info ("Network: Join AllDRouters on ifindex %d", ifindex);
@@ -264,7 +264,7 @@
   retval = sendmsg (ospf6_sock, &smsghdr, 0);
   if (retval != iov_totallen (message))
     zlog_warn ("sendmsg failed: ifindex: %d: %s (%d)",
-               *ifindex, strerror (errno), errno);
+               *ifindex, safe_strerror (errno), errno);
 
   return retval;
 }
@@ -300,7 +300,7 @@
 
   retval = recvmsg (ospf6_sock, &rmsghdr, 0);
   if (retval < 0)
-    zlog_warn ("recvmsg failed: %s", strerror (errno));
+    zlog_warn ("recvmsg failed: %s", safe_strerror (errno));
   else if (retval == iov_totallen (message))
     zlog_warn ("recvmsg read full buffer size: %d", retval);
 
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c
index 0baaaea..2b21567 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -461,7 +461,7 @@
 
   if (ret < 0)
     zlog_err ("zapi_ipv6_route() %s failed: %s",
-              (type == REM ? "delete" : "add"), strerror (errno));
+              (type == REM ? "delete" : "add"), safe_strerror (errno));
 
   XFREE (MTYPE_OSPF6_OTHER, nexthops);
   XFREE (MTYPE_OSPF6_OTHER, ifindexes);
diff --git a/ospfclient/ospf_apiclient.c b/ospfclient/ospf_apiclient.c
index 96ccb8b..d6aa638 100644
--- a/ospfclient/ospf_apiclient.c
+++ b/ospfclient/ospf_apiclient.c
@@ -156,7 +156,7 @@
   ret = listen (async_server_sock, BACKLOG);
   if (ret < 0)
     {
-      fprintf (stderr, "ospf_apiclient_connect: listen: %s\n", strerror (errno));
+      fprintf (stderr, "ospf_apiclient_connect: listen: %s\n", safe_strerror (errno));
       close (async_server_sock);
       return NULL;
     }
diff --git a/ospfd/ospf_api.c b/ospfd/ospf_api.c
index cd69336..8821d74 100644
--- a/ospfd/ospf_api.c
+++ b/ospfd/ospf_api.c
@@ -359,7 +359,7 @@
 
   if (rlen < 0)
     {
-      zlog_warn ("msg_read: readn %s", strerror (errno));
+      zlog_warn ("msg_read: readn %s", safe_strerror (errno));
       return NULL;
     }
   else if (rlen == 0)
@@ -389,7 +389,7 @@
       rlen = readn (fd, buf, bodylen);
       if (rlen < 0)
 	{
-	  zlog_warn ("msg_read: readn %s", strerror (errno));
+	  zlog_warn ("msg_read: readn %s", safe_strerror (errno));
 	  return NULL;
 	}
       else if (rlen == 0)
@@ -431,7 +431,7 @@
   wlen = writen (fd, buf, l);
   if (wlen < 0)
     {
-      zlog_warn ("msg_write: writen %s", strerror (errno));
+      zlog_warn ("msg_write: writen %s", safe_strerror (errno));
       return -1;
     }
   else if (wlen == 0)
diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c
index 8bc16dc..671bbc5 100644
--- a/ospfd/ospf_apiserver.c
+++ b/ospfd/ospf_apiserver.c
@@ -646,7 +646,7 @@
   if (rc < 0)
     {
       zlog_warn ("ospf_apiserver_serv_sock_family: listen: %s",
-                 strerror (errno));
+                 safe_strerror (errno));
       close (accept_sock);	/* Close socket */
       return rc;
     }
@@ -680,7 +680,7 @@
   new_sync_sock = sockunion_accept (accept_sock, &su);
   if (new_sync_sock < 0)
     {
-      zlog_warn ("ospf_apiserver_accept: accept: %s", strerror (errno));
+      zlog_warn ("ospf_apiserver_accept: accept: %s", safe_strerror (errno));
       return -1;
     }
 
@@ -693,7 +693,7 @@
   ret = getpeername (new_sync_sock, (struct sockaddr *)&peer_sync, &peerlen);
   if (ret < 0)
     {
-      zlog_warn ("ospf_apiserver_accept: getpeername: %s", strerror (errno));
+      zlog_warn ("ospf_apiserver_accept: getpeername: %s", safe_strerror (errno));
       close (new_sync_sock);
       return -1;
     }
@@ -718,7 +718,7 @@
   new_async_sock = socket (AF_INET, SOCK_STREAM, 0);
   if (new_async_sock < 0)
     {
-      zlog_warn ("ospf_apiserver_accept: socket: %s", strerror (errno));
+      zlog_warn ("ospf_apiserver_accept: socket: %s", safe_strerror (errno));
       close (new_sync_sock);
       return -1;
     }
@@ -728,7 +728,7 @@
 
   if (ret < 0)
     {
-      zlog_warn ("ospf_apiserver_accept: connect: %s", strerror (errno));
+      zlog_warn ("ospf_apiserver_accept: connect: %s", safe_strerror (errno));
       close (new_sync_sock);
       close (new_async_sock);
       return -1;
@@ -740,7 +740,7 @@
   ret = shutdown (new_async_sock, SHUT_RD);
   if (ret < 0)
     {
-      zlog_warn ("ospf_apiserver_accept: shutdown: %s", strerror (errno));
+      zlog_warn ("ospf_apiserver_accept: shutdown: %s", safe_strerror (errno));
       close (new_sync_sock);
       close (new_async_sock);
       return -1;
diff --git a/ospfd/ospf_network.c b/ospfd/ospf_network.c
index 266f775..7d5b730 100644
--- a/ospfd/ospf_network.c
+++ b/ospfd/ospf_network.c
@@ -56,7 +56,7 @@
                                    ifindex);
   if (ret < 0)
     zlog_warn ("can't setsockopt IP_ADD_MEMBERSHIP (AllSPFRouters): %s",
-               strerror (errno));
+               safe_strerror (errno));
   else
     zlog_info ("interface %s join AllSPFRouters Multicast group.",
 	       inet_ntoa (p->u.prefix4));
@@ -75,7 +75,7 @@
                                    ifindex);
   if (ret < 0)
     zlog_warn("can't setsockopt IP_DROP_MEMBERSHIP (AllSPFRouters): %s",
-	      strerror (errno));
+	      safe_strerror (errno));
   else
     zlog_info ("interface %s leave AllSPFRouters Multicast group.",
 	       inet_ntoa (p->u.prefix4));
@@ -95,7 +95,7 @@
                                    ifindex);
   if (ret < 0)
     zlog_warn ("can't setsockopt IP_ADD_MEMBERSHIP (AllDRouters): %s",
-               strerror (errno));
+               safe_strerror (errno));
   else
     zlog_info ("interface %s join AllDRouters Multicast group.",
 	       inet_ntoa (p->u.prefix4));
@@ -114,7 +114,7 @@
                                    ifindex);
   if (ret < 0)
     zlog_warn ("can't setsockopt IP_DROP_MEMBERSHIP (AllDRouters): %s",
-	       strerror (errno));
+	       safe_strerror (errno));
   else
     zlog_info ("interface %s leave AllDRouters Multicast group.",
 	       inet_ntoa (p->u.prefix4));
@@ -134,18 +134,18 @@
   /* Prevent receiving self-origined multicast packets. */
   ret = setsockopt (top->fd, IPPROTO_IP, IP_MULTICAST_LOOP, (void *)&val, len);
   if (ret < 0)
-    zlog_warn ("can't setsockopt IP_MULTICAST_LOOP(0): %s", strerror (errno));
+    zlog_warn ("can't setsockopt IP_MULTICAST_LOOP(0): %s", safe_strerror (errno));
   
   /* Explicitly set multicast ttl to 1 -- endo. */
   val = 1;
   ret = setsockopt (top->fd, IPPROTO_IP, IP_MULTICAST_TTL, (void *)&val, len);
   if (ret < 0)
-    zlog_warn ("can't setsockopt IP_MULTICAST_TTL(1): %s", strerror (errno));
+    zlog_warn ("can't setsockopt IP_MULTICAST_TTL(1): %s", safe_strerror (errno));
 
   ret = setsockopt_multicast_ipv4 (top->fd, IP_MULTICAST_IF,
                                    p->u.prefix4, 0, ifindex);
   if (ret < 0)
-    zlog_warn ("can't setsockopt IP_MULTICAST_IF: %s", strerror (errno));
+    zlog_warn ("can't setsockopt IP_MULTICAST_IF: %s", safe_strerror (errno));
 
   return ret;
 }
@@ -158,15 +158,15 @@
 
   if ( ospfd_privs.change (ZPRIVS_RAISE) )
     zlog_err ("ospf_sock_init: could not raise privs, %s",
-               strerror (errno) );
+               safe_strerror (errno) );
     
   ospf_sock = socket (AF_INET, SOCK_RAW, IPPROTO_OSPFIGP);
   if (ospf_sock < 0)
     {
       if ( ospfd_privs.change (ZPRIVS_LOWER) )
         zlog_err ("ospf_sock_init: could not lower privs, %s",
-                   strerror (errno) );
-      zlog_err ("ospf_read_sock_init: socket: %s", strerror (errno));
+                   safe_strerror (errno) );
+      zlog_err ("ospf_read_sock_init: socket: %s", safe_strerror (errno));
       exit(-1);
     }
     
@@ -177,7 +177,7 @@
     {
       if ( ospfd_privs.change (ZPRIVS_LOWER) )
         zlog_err ("ospf_sock_init: could not lower privs, %s",
-                   strerror (errno) );
+                   safe_strerror (errno) );
       zlog_warn ("Can't set IP_HDRINCL option");
     }
 #elif defined (IPTOS_PREC_INTERNETCONTROL)
@@ -191,7 +191,7 @@
     {
       if ( ospfd_privs.change (ZPRIVS_LOWER) )
         zlog_err ("ospf_sock_init: could not lower privs, %s",
-                   strerror (errno) );
+                   safe_strerror (errno) );
       zlog_warn ("can't set sockopt IP_TOS %d to socket %d", tos, ospf_sock);
       close (ospf_sock);	/* Prevent sd leak. */
       return ret;
@@ -209,7 +209,7 @@
   if (ospfd_privs.change (ZPRIVS_LOWER))
     {
       zlog_err ("ospf_sock_init: could not lower privs, %s",
-               strerror (errno) );
+               safe_strerror (errno) );
     }
  
   return ospf_sock;
diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c
index 8563b85..74bb5b7 100644
--- a/ospfd/ospf_opaque.c
+++ b/ospfd/ospf_opaque.c
@@ -387,7 +387,7 @@
 		      sizeof (struct ospf_opaque_functab))) == NULL)
     {
       zlog_warn ("ospf_register_opaque_functab: XMALLOC: %s",
-                 strerror (errno));
+                 safe_strerror (errno));
       goto out;
     }
 
@@ -536,7 +536,7 @@
   if ((oipt = XCALLOC (MTYPE_OPAQUE_INFO_PER_TYPE,
 		       sizeof (struct opaque_info_per_type))) == NULL)
     {
-      zlog_warn ("register_opaque_info_per_type: XMALLOC: %s", strerror (errno));
+      zlog_warn ("register_opaque_info_per_type: XMALLOC: %s", safe_strerror (errno));
       goto out;
     }
 
@@ -689,7 +689,7 @@
   if ((oipi = XCALLOC (MTYPE_OPAQUE_INFO_PER_ID,
 		       sizeof (struct opaque_info_per_id))) == NULL)
     {
-      zlog_warn ("register_opaque_info_per_id: XMALLOC: %s", strerror (errno));
+      zlog_warn ("register_opaque_info_per_id: XMALLOC: %s", safe_strerror (errno));
       goto out;
     }
   oipi->opaque_id = GET_OPAQUE_ID (ntohl (new->data->id.s_addr));
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index c582533..729c8f7 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -539,7 +539,7 @@
                    iph->ip_id,
                    iph->ip_off,
                    iph->ip_len,
-                   strerror (errno));
+                   safe_strerror (errno));
       
       if (IS_DEBUG_OSPF_PACKET (type - 1, SEND))
         {
@@ -690,7 +690,7 @@
   
   if (ret < 0)
     zlog_warn ("*** sendmsg in ospf_write to %s failed with %s",
-      inet_ntoa (iph.ip_dst), strerror (errno));
+      inet_ntoa (iph.ip_dst), safe_strerror (errno));
 
   /* Show debug sending packet. */
   if (IS_DEBUG_OSPF_PACKET (type - 1, SEND))
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c
index 4a28ae8..ff89350 100644
--- a/ospfd/ospf_te.c
+++ b/ospfd/ospf_te.c
@@ -563,7 +563,7 @@
   if ((new = XMALLOC (MTYPE_OSPF_MPLS_TE_LINKPARAMS,
                   sizeof (struct mpls_te_link))) == NULL)
     {
-      zlog_warn ("ospf_mpls_te_new_if: XMALLOC: %s", strerror (errno));
+      zlog_warn ("ospf_mpls_te_new_if: XMALLOC: %s", safe_strerror (errno));
       goto out;
     }
   memset (new, 0, sizeof (struct mpls_te_link));
@@ -1647,7 +1647,7 @@
   ntohf (&lp->max_bw.value, &f1);
   if (sscanf (argv[0], "%g", &f2) != 1)
     {
-      vty_out (vty, "mpls_te_link_maxbw: fscanf: %s%s", strerror (errno), VTY_NEWLINE);
+      vty_out (vty, "mpls_te_link_maxbw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE);
       return CMD_WARNING;
     }
 
@@ -1689,7 +1689,7 @@
   ntohf (&lp->max_rsv_bw.value, &f1);
   if (sscanf (argv[0], "%g", &f2) != 1)
     {
-      vty_out (vty, "mpls_te_link_max_rsv_bw: fscanf: %s%s", strerror (errno), VTY_NEWLINE);
+      vty_out (vty, "mpls_te_link_max_rsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE);
       return CMD_WARNING;
     }
 
@@ -1733,14 +1733,14 @@
   /* We don't have to consider about range check here. */
   if (sscanf (argv[0], "%d", &priority) != 1)
     {
-      vty_out (vty, "mpls_te_link_unrsv_bw: fscanf: %s%s", strerror (errno), VTY_NEWLINE);
+      vty_out (vty, "mpls_te_link_unrsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE);
       return CMD_WARNING;
     }
 
   ntohf (&lp->unrsv_bw.value [priority], &f1);
   if (sscanf (argv[1], "%g", &f2) != 1)
     {
-      vty_out (vty, "mpls_te_link_unrsv_bw: fscanf: %s%s", strerror (errno), VTY_NEWLINE);
+      vty_out (vty, "mpls_te_link_unrsv_bw: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE);
       return CMD_WARNING;
     }
 
@@ -1781,7 +1781,7 @@
 
   if (sscanf (argv[0], "0x%lx", &value) != 1)
     {
-      vty_out (vty, "mpls_te_link_rsc_clsclr: fscanf: %s%s", strerror (errno), VTY_NEWLINE);
+      vty_out (vty, "mpls_te_link_rsc_clsclr: fscanf: %s%s", safe_strerror (errno), VTY_NEWLINE);
       return CMD_WARNING;
     }
 
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index c1c0a45..55848fa 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -86,7 +86,7 @@
 
   if (ret < 0) 
     zlog (NULL, LOG_INFO, "can't setsockopt IP_ADD_MEMBERSHIP %s",
-	  strerror (errno));
+	  safe_strerror (errno));
 
   return ret;
 }
@@ -193,7 +193,7 @@
 	      	 sock,inet_ntoa(from.sin_addr),
 		 (int)ntohs(from.sin_port),
 		 connected->ifp->name,
-		  strerror (errno));
+		  safe_strerror (errno));
     }
 
   if (ripd_privs.change (ZPRIVS_LOWER))
diff --git a/ripd/ripd.c b/ripd/ripd.c
index 0f854cf..e239fd4 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -1350,7 +1350,7 @@
       if (send_sock < 0)
         {
           zlog_warn("rip_send_packet could not create socket %s",
-                    strerror(errno));
+                    safe_strerror(errno));
           return -1;
     }
       sockopt_broadcast (send_sock);
@@ -1370,7 +1370,7 @@
                   ntohs (sin.sin_port));
 
   if (ret < 0)
-    zlog_warn ("can't send packet : %s", strerror (errno));
+    zlog_warn ("can't send packet : %s", safe_strerror (errno));
 
   if (!to)
     close(send_sock);
@@ -1604,7 +1604,7 @@
     
   ret = setsockopt(sock, IPPROTO_IP, IP_PKTINFO, &val, sizeof(val));
   if (ret < 0)
-    zlog_warn ("Can't setsockopt IP_PKTINFO : %s", strerror (errno));
+    zlog_warn ("Can't setsockopt IP_PKTINFO : %s", safe_strerror (errno));
   return ret;
 }
 
@@ -1662,7 +1662,7 @@
   ret = rip_recvmsg (sock, buf, RIP_PACKET_MAXSIZ, &from, (int *)&ifindex);
   if (ret < 0)
     {
-      zlog_warn ("Can't read RIP packet: %s", strerror (errno));
+      zlog_warn ("Can't read RIP packet: %s", safe_strerror (errno));
       return ret;
     }
 
@@ -1701,7 +1701,7 @@
 		  (struct sockaddr *) &from, &fromlen);
   if (len < 0) 
     {
-      zlog_info ("recvfrom failed: %s", strerror (errno));
+      zlog_info ("recvfrom failed: %s", safe_strerror (errno));
       return len;
     }
 
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c
index f5467f9..a7c9cef 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -94,7 +94,7 @@
       }
 
     if (ret < 0)
-      zlog_warn ("can't setsockopt IPV6_JOIN_GROUP: %s", strerror (errno));
+      zlog_warn ("can't setsockopt IPV6_JOIN_GROUP: %s", safe_strerror (errno));
 
     if (IS_RIPNG_DEBUG_EVENT)
       zlog_info ("RIPng %s join to all-rip-routers multicast group", ifp->name);
@@ -120,7 +120,7 @@
     ret = setsockopt (ripng->sock, IPPROTO_IPV6, IPV6_LEAVE_GROUP,
 		      (char *) &mreq, sizeof (mreq));
     if (ret < 0)
-      zlog_warn ("can't setsockopt IPV6_LEAVE_GROUP: %s\n", strerror (errno));
+      zlog_warn ("can't setsockopt IPV6_LEAVE_GROUP: %s\n", safe_strerror (errno));
 
     if (IS_RIPNG_DEBUG_EVENT)
       zlog_info ("RIPng %s leave from all-rip-routers multicast group",
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index edf959f..5d5c25d 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -151,7 +151,7 @@
   ret = bind (sock, (struct sockaddr *) &ripaddr, sizeof (ripaddr));
   if (ret < 0)
   {
-    zlog (NULL, LOG_ERR, "Can't bind ripng socket: %s.", strerror (errno));
+    zlog (NULL, LOG_ERR, "Can't bind ripng socket: %s.", safe_strerror (errno));
     if (ripngd_privs.change (ZPRIVS_LOWER))
       zlog_err ("ripng_make_socket: could not lower privs");
     return ret;
@@ -224,9 +224,9 @@
   if (ret < 0) {
     if (to)
       zlog_err ("RIPng send fail on %s to %s: %s", ifp->name, 
-                inet6_ntop (&to->sin6_addr), strerror (errno));
+                inet6_ntop (&to->sin6_addr), safe_strerror (errno));
     else
-      zlog_err ("RIPng send fail on %s: %s", ifp->name, strerror (errno));
+      zlog_err ("RIPng send fail on %s: %s", ifp->name, safe_strerror (errno));
   }
 
   return ret;
@@ -1360,7 +1360,7 @@
 			   &hoplimit);
   if (len < 0) 
     {
-      zlog_warn ("RIPng recvfrom failed: %s.", strerror (errno));
+      zlog_warn ("RIPng recvfrom failed: %s.", safe_strerror (errno));
       return len;
     }
 
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index c7271ff..08bd127 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -33,6 +33,7 @@
 #include "command.h"
 #include "memory.h"
 #include "vtysh/vtysh.h"
+#include "log.h"
 
 /* Struct VTY. */
 struct vty *vty;
@@ -1562,7 +1563,7 @@
   if (chmod (integrate_default, CONFIGFILE_MASK) != 0)
     {
       fprintf (stdout,"%% Can't chmod configuration file %s: %s (%d)\n", 
-	integrate_default, strerror(errno), errno);
+	integrate_default, safe_strerror(errno), errno);
       return CMD_WARNING;
     }
 
@@ -1715,7 +1716,7 @@
   if (pid < 0)
     {
       /* Failure of fork(). */
-      fprintf (stderr, "Can't fork: %s\n", strerror (errno));
+      fprintf (stderr, "Can't fork: %s\n", safe_strerror (errno));
       exit (1);
     }
   else if (pid == 0)
@@ -1735,7 +1736,7 @@
 	}
 
       /* When execlp suceed, this part is not executed. */
-      fprintf (stderr, "Can't execute %s: %s\n", command, strerror (errno));
+      fprintf (stderr, "Can't execute %s: %s\n", command, safe_strerror (errno));
       exit (1);
     }
   else
@@ -1893,7 +1894,7 @@
   if (ret < 0 && errno != ENOENT)
     {
       fprintf  (stderr, "vtysh_connect(%s): stat = %s\n", 
-		path, strerror(errno)); 
+		path, safe_strerror(errno)); 
       exit(1);
     }
   
@@ -1913,7 +1914,7 @@
     {
 #ifdef DEBUG
       fprintf(stderr, "vtysh_connect(%s): socket = %s\n", path,
-	      strerror(errno));
+	      safe_strerror(errno));
 #endif /* DEBUG */
       return -1;
     }
@@ -1932,7 +1933,7 @@
     {
 #ifdef DEBUG
       fprintf(stderr, "vtysh_connect(%s): connect = %s\n", path,
-	      strerror(errno));
+	      safe_strerror(errno));
 #endif /* DEBUG */
       close (sock);
       return -1;
diff --git a/zebra/if_ioctl.c b/zebra/if_ioctl.c
index 431e7ea..90f18e2 100644
--- a/zebra/if_ioctl.c
+++ b/zebra/if_ioctl.c
@@ -50,7 +50,7 @@
   sock = socket (AF_INET, SOCK_DGRAM, 0);
   if (sock < 0) 
     {
-      zlog_warn ("Can't make AF_INET socket stream: %s", strerror (errno));
+      zlog_warn ("Can't make AF_INET socket stream: %s", safe_strerror (errno));
       return -1;
     }
 
@@ -79,7 +79,7 @@
 
       if (ret < 0) 
 	{
-	  zlog_warn ("SIOCGIFCONF: %s", strerror(errno));
+	  zlog_warn ("SIOCGIFCONF: %s", safe_strerror(errno));
 	  goto end;
 	}
       /* Repeatedly get info til buffer fails to grow. */
@@ -218,7 +218,7 @@
   ret = getifaddrs (&ifap); 
   if (ret != 0)
     {
-      zlog_err ("getifaddrs(): %s", strerror (errno));
+      zlog_err ("getifaddrs(): %s", safe_strerror (errno));
       return -1;
     }
 
@@ -334,7 +334,7 @@
     {
       if (errno != EADDRNOTAVAIL)
 	{
-	  zlog_warn ("SIOCGIFADDR fail: %s", strerror (errno));
+	  zlog_warn ("SIOCGIFADDR fail: %s", safe_strerror (errno));
 	  return ret;
 	}
       return 0;
@@ -347,7 +347,7 @@
     {
       if (errno != EADDRNOTAVAIL) 
 	{
-	  zlog_warn ("SIOCGIFNETMASK fail: %s", strerror (errno));
+	  zlog_warn ("SIOCGIFNETMASK fail: %s", safe_strerror (errno));
 	  return ret;
 	}
       return 0;
@@ -369,7 +369,7 @@
 	{
 	  if (errno != EADDRNOTAVAIL) 
 	    {
-	      zlog_warn ("SIOCGIFDSTADDR fail: %s", strerror (errno));
+	      zlog_warn ("SIOCGIFDSTADDR fail: %s", safe_strerror (errno));
 	      return ret;
 	    }
 	  return 0;
@@ -384,7 +384,7 @@
 	{
 	  if (errno != EADDRNOTAVAIL) 
 	    {
-	      zlog_warn ("SIOCGIFBRDADDR fail: %s", strerror (errno));
+	      zlog_warn ("SIOCGIFBRDADDR fail: %s", safe_strerror (errno));
 	      return ret;
 	    }
 	  return 0;
diff --git a/zebra/if_ioctl_solaris.c b/zebra/if_ioctl_solaris.c
index 4f8284a..1cbf555 100644
--- a/zebra/if_ioctl_solaris.c
+++ b/zebra/if_ioctl_solaris.c
@@ -60,7 +60,7 @@
   if (sock < 0)
     {
       zlog_warn ("Can't make %s socket stream: %s",
-                 (af == AF_INET ? "AF_INET" : "AF_INET6"), strerror (errno));
+                 (af == AF_INET ? "AF_INET" : "AF_INET6"), safe_strerror (errno));
                  
       if (zserv_privs.change(ZPRIVS_LOWER))
         zlog (NULL, LOG_ERR, "Can't lower privileges");
@@ -79,7 +79,7 @@
   if (ret < 0)
     {
       zlog_warn ("interface_list_ioctl: SIOCGLIFNUM failed %s",
-                 strerror (errno));
+                 safe_strerror (errno));
       close (sock);
       return -1;
     }
@@ -120,7 +120,7 @@
       if (errno == EINVAL)
         goto calculate_lifc_len; /* deliberately hold privileges */
 
-      zlog_warn ("SIOCGLIFCONF: %s", strerror (errno));
+      zlog_warn ("SIOCGLIFCONF: %s", safe_strerror (errno));
 
       if (zserv_privs.change(ZPRIVS_LOWER))
         zlog (NULL, LOG_ERR, "Can't lower privileges");
@@ -232,7 +232,7 @@
       if (ret < 0)
         {
           zlog_warn ("SIOCGLIFDSTADDR (%s) fail: %s",
-                     ifp->name, strerror (errno));
+                     ifp->name, safe_strerror (errno));
           return ret;
         }
       memcpy (&dest, &lifreq.lifr_dstaddr, ADDRLEN (addr));
@@ -251,7 +251,7 @@
           if (errno != EADDRNOTAVAIL)
             {
               zlog_warn ("SIOCGLIFNETMASK (%s) fail: %s", ifp->name,
-                         strerror (errno));
+                         safe_strerror (errno));
               return ret;
             }
           return 0;
@@ -267,7 +267,7 @@
               if (errno != EADDRNOTAVAIL)
                 {
                   zlog_warn ("SIOCGLIFBRDADDR (%s) fail: %s",
-                             ifp->name, strerror (errno));
+                             ifp->name, safe_strerror (errno));
                   return ret;
                 }
               return 0;
@@ -289,7 +289,7 @@
           if (ret < 0)
             {
               zlog_warn ("SIOCGLIFSUBNET (%s) fail: %s",
-                         ifp->name, strerror (errno));
+                         ifp->name, safe_strerror (errno));
             }
           else
             {
diff --git a/zebra/if_proc.c b/zebra/if_proc.c
index 6c47d43..199a8e7 100644
--- a/zebra/if_proc.c
+++ b/zebra/if_proc.c
@@ -138,7 +138,7 @@
   if (fp == NULL)
     {
       zlog_warn ("Can't open proc file %s: %s",
-		 _PATH_PROC_NET_DEV, strerror (errno));
+		 _PATH_PROC_NET_DEV, safe_strerror (errno));
       return -1;
     }
 
@@ -179,7 +179,7 @@
   if (fp == NULL)
     {
       zlog_warn ("Can't open proc file %s: %s",
-		 _PATH_PROC_NET_DEV, strerror (errno));
+		 _PATH_PROC_NET_DEV, safe_strerror (errno));
       return -1;
     }
 
@@ -222,7 +222,7 @@
   if (fp == NULL)
     {
       zlog_warn ("Can't open proc file %s: %s",
-		 _PATH_PROC_NET_IF_INET6, strerror (errno));
+		 _PATH_PROC_NET_IF_INET6, safe_strerror (errno));
       return -1;
     }
   
diff --git a/zebra/if_sysctl.c b/zebra/if_sysctl.c
index 1441dfc..7ad570f 100644
--- a/zebra/if_sysctl.c
+++ b/zebra/if_sysctl.c
@@ -52,7 +52,7 @@
   /* Query buffer size. */
   if (sysctl (mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0) 
     {
-      zlog_warn ("sysctl() error by %s", strerror (errno));
+      zlog_warn ("sysctl() error by %s", safe_strerror (errno));
       return -1;
     }
 
@@ -62,7 +62,7 @@
   /* Fetch interface informations into allocated buffer. */
   if (sysctl (mib, MIBSIZ, buf, &bufsiz, NULL, 0) < 0) 
     {
-      zlog (NULL, LOG_WARNING, "sysctl error by %s", strerror (errno));
+      zlog (NULL, LOG_WARNING, "sysctl error by %s", safe_strerror (errno));
       return -1;
     }
 
@@ -108,7 +108,7 @@
   /* Query buffer size. */
   if (sysctl (mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0) 
     {
-      zlog (NULL, LOG_WARNING, "sysctl() error by %s", strerror (errno));
+      zlog (NULL, LOG_WARNING, "sysctl() error by %s", safe_strerror (errno));
       return;
     }
 
@@ -118,7 +118,7 @@
   /* Fetch interface informations into allocated buffer. */
   if (sysctl (mib, MIBSIZ, buf, &bufsiz, NULL, 0) < 0) 
     {
-      zlog (NULL, LOG_WARNING, "sysctl error by %s", strerror (errno));
+      zlog (NULL, LOG_WARNING, "sysctl error by %s", safe_strerror (errno));
       return;
     }
 
diff --git a/zebra/interface.c b/zebra/interface.c
index 813adb8..f97dc3f 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -234,7 +234,7 @@
 	      if (ret < 0)
 		{
 		  zlog_warn ("Can't set interface's address: %s", 
-			     strerror(errno));
+			     safe_strerror(errno));
 		  continue;
 		}
 
@@ -261,7 +261,7 @@
 	      if (ret < 0)
 		{
 		  zlog_warn ("Can't set interface's address: %s", 
-			     strerror(errno));
+			     safe_strerror(errno));
 		  continue;
 		}
 	      SET_FLAG (ifc->conf, ZEBRA_IFC_REAL);
@@ -1163,7 +1163,7 @@
       if (ret < 0)
 	{
 	  vty_out (vty, "%% Can't set interface IP address: %s.%s", 
-		   strerror(errno), VTY_NEWLINE);
+		   safe_strerror(errno), VTY_NEWLINE);
 	  return CMD_WARNING;
 	}
 
@@ -1227,7 +1227,7 @@
   if (ret < 0)
     {
       vty_out (vty, "%% Can't unset interface IP address: %s.%s", 
-	       strerror(errno), VTY_NEWLINE);
+	       safe_strerror(errno), VTY_NEWLINE);
       return CMD_WARNING;
     }
 
@@ -1355,7 +1355,7 @@
       if (ret < 0)
 	{
 	  vty_out (vty, "%% Can't set interface IP address: %s.%s", 
-		   strerror(errno), VTY_NEWLINE);
+		   safe_strerror(errno), VTY_NEWLINE);
 	  return CMD_WARNING;
 	}
 
@@ -1416,7 +1416,7 @@
   if (ret < 0)
     {
       vty_out (vty, "%% Can't unset interface IP address: %s.%s", 
-	       strerror(errno), VTY_NEWLINE);
+	       safe_strerror(errno), VTY_NEWLINE);
       return CMD_WARNING;
     }
 
diff --git a/zebra/ioctl_solaris.c b/zebra/ioctl_solaris.c
index 7b4dde3..8ebd0f4 100644
--- a/zebra/ioctl_solaris.c
+++ b/zebra/ioctl_solaris.c
@@ -331,7 +331,7 @@
 
   if (ret < 0)
     zlog_info ("can't set interface flags on %s: %s", ifp->name,
-               strerror (errno));
+               safe_strerror (errno));
   else
     ret = 0;
     
diff --git a/zebra/ipforward_proc.c b/zebra/ipforward_proc.c
index 4c30cf6..443cb1c 100644
--- a/zebra/ipforward_proc.c
+++ b/zebra/ipforward_proc.c
@@ -77,13 +77,13 @@
   FILE *fp;
   
   if ( zserv_privs.change(ZPRIVS_RAISE) )
-  	zlog_err ("Can't raise privileges, %s", strerror (errno) );
+  	zlog_err ("Can't raise privileges, %s", safe_strerror (errno) );
 
   fp = fopen (proc_ipv4_forwarding, "w");
 
   if (fp == NULL) {
     if ( zserv_privs.change(ZPRIVS_LOWER) )
-      zlog_err ("Can't lower privileges, %s", strerror (errno));
+      zlog_err ("Can't lower privileges, %s", safe_strerror (errno));
     return -1;
   }
 
@@ -92,7 +92,7 @@
   fclose (fp);
 
   if ( zserv_privs.change(ZPRIVS_LOWER) )
-    zlog_err ("Can't lower privileges, %s", strerror (errno));
+    zlog_err ("Can't lower privileges, %s", safe_strerror (errno));
 
   return ipforward ();
 }
@@ -103,13 +103,13 @@
   FILE *fp;
 
   if ( zserv_privs.change(ZPRIVS_RAISE) )
-  	zlog_err ("Can't raise privileges, %s", strerror (errno));
+  	zlog_err ("Can't raise privileges, %s", safe_strerror (errno));
 
   fp = fopen (proc_ipv4_forwarding, "w");
 
   if (fp == NULL) {
     if ( zserv_privs.change(ZPRIVS_LOWER) )
-      zlog_err ("Can't lower privileges, %s", strerror (errno));
+      zlog_err ("Can't lower privileges, %s", safe_strerror (errno));
     return -1;
   }
 
@@ -118,7 +118,7 @@
   fclose (fp);
 
   if ( zserv_privs.change(ZPRIVS_LOWER) )
-    zlog_err ("Can't lower privileges, %s", strerror (errno));
+    zlog_err ("Can't lower privileges, %s", safe_strerror (errno));
 
   return ipforward ();
 }
@@ -150,13 +150,13 @@
   FILE *fp;
 
   if ( zserv_privs.change(ZPRIVS_RAISE) )
-  	zlog_err ("Can't raise privileges, %s", strerror (errno));
+  	zlog_err ("Can't raise privileges, %s", safe_strerror (errno));
 
   fp = fopen (proc_ipv6_forwarding, "w");
 
   if (fp == NULL) {
     if ( zserv_privs.change(ZPRIVS_LOWER) )
-      zlog_err ("Can't lower privileges, %s", strerror (errno));
+      zlog_err ("Can't lower privileges, %s", safe_strerror (errno));
     return -1;
   }
 
@@ -165,7 +165,7 @@
   fclose (fp);
 
   if ( zserv_privs.change(ZPRIVS_LOWER) )
-    zlog_err ("Can't lower privileges, %s", strerror (errno));
+    zlog_err ("Can't lower privileges, %s", safe_strerror (errno));
 
   return ipforward_ipv6 ();
 }
@@ -176,13 +176,13 @@
   FILE *fp;
 
   if ( zserv_privs.change(ZPRIVS_RAISE) )
-  	zlog_err ("Can't raise privileges, %s", strerror (errno));
+  	zlog_err ("Can't raise privileges, %s", safe_strerror (errno));
 
   fp = fopen (proc_ipv6_forwarding, "w");
 
   if (fp == NULL) {
     if ( zserv_privs.change(ZPRIVS_LOWER) )
-      zlog_err ("Can't lower privileges, %s", strerror (errno));
+      zlog_err ("Can't lower privileges, %s", safe_strerror (errno));
     return -1;
   }
 
@@ -191,7 +191,7 @@
   fclose (fp);
 
   if ( zserv_privs.change(ZPRIVS_LOWER) )
-    zlog_err ("Can't lower privileges, %s", strerror (errno));
+    zlog_err ("Can't lower privileges, %s", safe_strerror (errno));
 
   return ipforward_ipv6 ();
 }
diff --git a/zebra/ipforward_solaris.c b/zebra/ipforward_solaris.c
index 8d6fd98..2eaf341 100644
--- a/zebra/ipforward_solaris.c
+++ b/zebra/ipforward_solaris.c
@@ -80,7 +80,7 @@
        zlog_err ("solaris_nd: Can't raise privileges");
   if ((fd = open (device, O_RDWR)) < 0) 
     {
-      zlog_warn("failed to open device %s - %s", device, strerror(errno));
+      zlog_warn("failed to open device %s - %s", device, safe_strerror(errno));
       if ( zserv_privs.change (ZPRIVS_LOWER) )
         zlog_err ("solaris_nd: Can't lower privileges");
       return -1;
@@ -90,7 +90,7 @@
       if ( zserv_privs.change (ZPRIVS_LOWER) )
         zlog_err ("solaris_nd: Can't lower privileges");
       close (fd);
-      zlog_warn("ioctl I_STR failed on device %s - %s", device,strerror(errno));
+      zlog_warn("ioctl I_STR failed on device %s - %s", device,safe_strerror(errno));
       return -1;
     }
   close(fd);
@@ -104,7 +104,7 @@
       if (errno) 
         {
           zlog_warn("failed to convert returned value to integer - %s",
-                    strerror(errno));
+                    safe_strerror(errno));
           retval = -1;
         }
     } 
diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c
index e824abe..d6fd1c5 100644
--- a/zebra/irdp_interface.c
+++ b/zebra/irdp_interface.c
@@ -116,7 +116,7 @@
     zlog_warn ("IRDP: %s can't setsockopt %s: %s",
 	       add_leave == IP_ADD_MEMBERSHIP? "join group":"leave group", 
                inet_2a(group, b1),
-               strerror (errno));
+               safe_strerror (errno));
 
   return ret;
 }
diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c
index 7b91696..8f0250b 100644
--- a/zebra/irdp_main.c
+++ b/zebra/irdp_main.c
@@ -104,16 +104,16 @@
 
   if ( zserv_privs.change (ZPRIVS_RAISE) )
        zlog_err ("irdp_sock_init: could not raise privs, %s",
-                  strerror (errno) );
+                  safe_strerror (errno) );
 
   irdp_sock = socket (AF_INET, SOCK_RAW, IPPROTO_ICMP);
 
   if ( zserv_privs.change (ZPRIVS_LOWER) )
        zlog_err ("irdp_sock_init: could not lower privs, %s",
-             strerror (errno) );
+             safe_strerror (errno) );
 
   if (irdp_sock < 0) {
-    zlog_warn ("IRDP: can't create irdp socket %s", strerror(errno));
+    zlog_warn ("IRDP: can't create irdp socket %s", safe_strerror(errno));
     return irdp_sock;
   };
   
@@ -121,13 +121,13 @@
   ret = setsockopt (irdp_sock, IPPROTO_IP, IP_TTL, 
                         (void *) &i, sizeof (i));
   if (ret < 0) {
-    zlog_warn ("IRDP: can't do irdp sockopt %s", strerror(errno));
+    zlog_warn ("IRDP: can't do irdp sockopt %s", safe_strerror(errno));
     return ret;
   };
   
   ret = setsockopt_ifindex (AF_INET, irdp_sock, 1);
   if (ret < 0) {
-    zlog_warn ("IRDP: can't do irdp sockopt %s", strerror(errno));
+    zlog_warn ("IRDP: can't do irdp sockopt %s", safe_strerror(errno));
     return ret;
   };
 
diff --git a/zebra/irdp_packet.c b/zebra/irdp_packet.c
index 6060435..d78348c 100644
--- a/zebra/irdp_packet.c
+++ b/zebra/irdp_packet.c
@@ -206,7 +206,7 @@
 
   ret = recvmsg (sock, &msg, 0);
   if (ret < 0) {
-    zlog_warn("IRDP: recvmsg: read error %s", strerror(errno));
+    zlog_warn("IRDP: recvmsg: read error %s", safe_strerror(errno));
     return ret;
   }
 
@@ -316,21 +316,21 @@
   on = 1;
   if (setsockopt(irdp_sock, IPPROTO_IP, IP_HDRINCL,
 		 (char *) &on, sizeof(on)) < 0)
-    zlog_warn("sendto %s", strerror (errno));
+    zlog_warn("sendto %s", safe_strerror (errno));
 
 
   if(dst == INADDR_BROADCAST ) {
     on = 1;
     if (setsockopt(irdp_sock, SOL_SOCKET, SO_BROADCAST,
 		   (char *) &on, sizeof(on)) < 0)
-      zlog_warn("sendto %s", strerror (errno));
+      zlog_warn("sendto %s", safe_strerror (errno));
   }
 
   if(dst !=  INADDR_BROADCAST) {
       on = 0; 
       if( setsockopt(irdp_sock,IPPROTO_IP, IP_MULTICAST_LOOP, 
 		     (char *)&on,sizeof(on)) < 0)
-	zlog_warn("sendto %s", strerror (errno));
+	zlog_warn("sendto %s", safe_strerror (errno));
   }
 
   bzero(&sockdst,sizeof(sockdst));
@@ -359,7 +359,7 @@
   sockopt_iphdrincl_swab_htosys (ip);
   
   if (sendmsg(irdp_sock, msg, 0) < 0) {
-    zlog_warn("sendto %s", strerror (errno));
+    zlog_warn("sendto %s", safe_strerror (errno));
   }
   /*   printf("TX on %s idx %d\n", ifp->name, ifp->ifindex); */
 }
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 27b8895..60542c6 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -798,7 +798,7 @@
       if (errno == ENETUNREACH)
 	return ZEBRA_ERR_RTUNREACH;
       
-      zlog_warn ("write : %s (%d)", strerror (errno), errno);
+      zlog_warn ("write : %s (%d)", safe_strerror (errno), errno);
       return -1;
     }
   return 0;
@@ -896,7 +896,7 @@
   if (nbytes <= 0)
     {
       if (nbytes < 0 && errno != EWOULDBLOCK && errno != EAGAIN)
-	zlog_warn ("routing socket error: %s", strerror (errno));
+	zlog_warn ("routing socket error: %s", safe_strerror (errno));
       return 0;
     }
 
diff --git a/zebra/rt_ioctl.c b/zebra/rt_ioctl.c
index d470572..3484010 100644
--- a/zebra/rt_ioctl.c
+++ b/zebra/rt_ioctl.c
@@ -151,7 +151,7 @@
 	}
 
       close (sock);
-      zlog_warn ("write : %s (%d)", strerror (errno), errno);
+      zlog_warn ("write : %s (%d)", safe_strerror (errno), errno);
       return 1;
     }
   close (sock);
@@ -326,7 +326,7 @@
 	}
 
       close (sock);
-      zlog_warn ("write : %s (%d)", strerror (errno), errno);
+      zlog_warn ("write : %s (%d)", safe_strerror (errno), errno);
       return ret;
     }
   close (sock);
@@ -411,7 +411,7 @@
   if (ret < 0)
     {
       zlog_warn ("can't %s ipv6 route: %s\n", type == SIOCADDRT ? "add" : "delete", 
-	   strerror(errno));
+	   safe_strerror(errno));
       ret = errno;
       close (sock);
       return ret;
@@ -526,7 +526,7 @@
     {
       zlog_warn ("can't %s ipv6 route: %s\n",
 		 cmd == SIOCADDRT ? "add" : "delete", 
-	   strerror(errno));
+	   safe_strerror(errno));
       ret = errno;
       close (sock);
       return ret;
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 50e83b7..eb31e6c 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -99,7 +99,7 @@
   if (sock < 0)
     {
       zlog (NULL, LOG_ERR, "Can't open %s socket: %s", nl->name,
-            strerror (errno));
+            safe_strerror (errno));
       return -1;
     }
 
@@ -107,7 +107,7 @@
   if (ret < 0)
     {
       zlog (NULL, LOG_ERR, "Can't set %s socket flags: %s", nl->name,
-            strerror (errno));
+            safe_strerror (errno));
       close (sock);
       return -1;
     }
@@ -125,7 +125,7 @@
       if (ret < 0)
 	{
 	  zlog (NULL, LOG_ERR, "Can't get %s receive buffer size: %s", nl->name,
-		strerror (errno));
+		safe_strerror (errno));
 	  close (sock);
 	  return -1;
 	}
@@ -135,7 +135,7 @@
       if (ret < 0)
 	{
 	  zlog (NULL, LOG_ERR, "Can't set %s receive buffer size: %s", nl->name,
-		strerror (errno));
+		safe_strerror (errno));
 	  close (sock);
 	  return -1;
 	}
@@ -144,7 +144,7 @@
       if (ret < 0)
 	{
 	  zlog (NULL, LOG_ERR, "Can't get %s receive buffer size: %s", nl->name,
-		strerror (errno));
+		safe_strerror (errno));
 	  close (sock);
 	  return -1;
 	}
@@ -172,7 +172,7 @@
   if (ret < 0)
     {
       zlog (NULL, LOG_ERR, "Can't bind %s socket to group 0x%x: %s",
-            nl->name, snl.nl_groups, strerror (errno));
+            nl->name, snl.nl_groups, safe_strerror (errno));
       close (sock);
       return -1;
     }
@@ -183,7 +183,7 @@
   if (ret < 0 || namelen != sizeof snl)
     {
       zlog (NULL, LOG_ERR, "Can't get %s socket name: %s", nl->name,
-            strerror (errno));
+            safe_strerror (errno));
       close (sock);
       return -1;
     }
@@ -201,14 +201,14 @@
   if ((*flags = fcntl (nl->sock, F_GETFL, 0)) < 0)
     {
       zlog (NULL, LOG_ERR, "%s:%i F_GETFL error: %s",
-            __FUNCTION__, __LINE__, strerror (errno));
+            __FUNCTION__, __LINE__, safe_strerror (errno));
       return -1;
     }
   *flags &= ~O_NONBLOCK;
   if (fcntl (nl->sock, F_SETFL, *flags) < 0)
     {
       zlog (NULL, LOG_ERR, "%s:%i F_SETFL error: %s",
-            __FUNCTION__, __LINE__, strerror (errno));
+            __FUNCTION__, __LINE__, safe_strerror (errno));
       return -1;
     }
   return 0;
@@ -222,7 +222,7 @@
   if (fcntl (nl->sock, F_SETFL, *flags) < 0)
     {
       zlog (NULL, LOG_ERR, "%s:%i F_SETFL error: %s",
-            __FUNCTION__, __LINE__, strerror (errno));
+            __FUNCTION__, __LINE__, safe_strerror (errno));
       return -1;
     }
   return 0;
@@ -277,7 +277,7 @@
   if (ret < 0)
     {
       zlog (NULL, LOG_ERR, "%s sendto failed: %s", nl->name,
-            strerror (errno));
+            safe_strerror (errno));
       return -1;
     }
 
@@ -392,7 +392,7 @@
 
                 zlog (NULL, loglvl, "%s error: %s, type=%s(%u), "
                       "seq=%u, pid=%d",
-                      nl->name, strerror (-errnum),
+                      nl->name, safe_strerror (-errnum),
                       lookup (nlmsg_str, msg_type),
                       msg_type, err->msg.nlmsg_seq, err->msg.nlmsg_pid);
               }
@@ -1227,7 +1227,7 @@
   if (status < 0)
     {
       zlog (NULL, LOG_ERR, "netlink_talk sendmsg() error: %s",
-            strerror (errno));
+            safe_strerror (errno));
       return -1;
     }
 
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index cb29a67..770f975 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -301,7 +301,7 @@
   if (ret < 0)
     {
       zlog_err ("rtadv_send_packet: sendmsg %d (%s)\n",
-		errno, strerror(errno));
+		errno, safe_strerror(errno));
     }
 }
 
@@ -425,7 +425,7 @@
 
   if (len < 0) 
     {
-      zlog_warn ("router solicitation recv failed: %s.", strerror (errno));
+      zlog_warn ("router solicitation recv failed: %s.", safe_strerror (errno));
       return len;
     }
 
@@ -443,13 +443,13 @@
 
   if ( zserv_privs.change (ZPRIVS_RAISE) )
        zlog_err ("rtadv_make_socket: could not raise privs, %s",
-                  strerror (errno) );
+                  safe_strerror (errno) );
                   
   sock = socket (AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
 
   if ( zserv_privs.change (ZPRIVS_LOWER) )
        zlog_err ("rtadv_make_socket: could not lower privs, %s",
-       			 strerror (errno) );
+       			 safe_strerror (errno) );
 
   /* When we can't make ICMPV6 socket simply back.  Router
      advertisement feature will not be supported. */
@@ -480,7 +480,7 @@
 		    sizeof (struct icmp6_filter));
   if (ret < 0)
     {
-      zlog_info ("ICMP6_FILTER set fail: %s", strerror (errno));
+      zlog_info ("ICMP6_FILTER set fail: %s", safe_strerror (errno));
       return ret;
     }
 
@@ -1223,7 +1223,7 @@
   ret = setsockopt (sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, 
 		    (char *) &mreq, sizeof mreq);
   if (ret < 0)
-    zlog_warn ("can't setsockopt IPV6_JOIN_GROUP: %s", strerror (errno));
+    zlog_warn ("can't setsockopt IPV6_JOIN_GROUP: %s", safe_strerror (errno));
 
   zlog_info ("rtadv: %s join to all-routers multicast group", ifp->name);
 
@@ -1244,7 +1244,7 @@
   ret = setsockopt (sock, IPPROTO_IPV6, IPV6_LEAVE_GROUP, 
 		    (char *) &mreq, sizeof mreq);
   if (ret < 0)
-    zlog_warn ("can't setsockopt IPV6_LEAVE_GROUP: %s", strerror (errno));
+    zlog_warn ("can't setsockopt IPV6_LEAVE_GROUP: %s", safe_strerror (errno));
 
   zlog_info ("rtadv: %s leave from all-routers multicast group", ifp->name);
 
diff --git a/zebra/rtread_getmsg.c b/zebra/rtread_getmsg.c
index 435eed8..ff6d7bc 100644
--- a/zebra/rtread_getmsg.c
+++ b/zebra/rtread_getmsg.c
@@ -108,7 +108,7 @@
 
 	if ((dev = open (_PATH_GETMSG_ROUTE, O_RDWR)) == -1) {
 		zlog_warn ("can't open %s: %s", _PATH_GETMSG_ROUTE,
-			strerror (errno));
+			safe_strerror (errno));
 		return;
 	}
 
@@ -129,7 +129,7 @@
 	flags = 0;
 
 	if (putmsg (dev, &msgdata, NULL, flags) == -1) {
-		zlog_warn ("putmsg failed: %s", strerror (errno));
+		zlog_warn ("putmsg failed: %s", safe_strerror (errno));
 		goto exit;
 	}
 
@@ -141,7 +141,7 @@
 		retval = getmsg (dev, &msgdata, NULL, &flags);
 
 		if (retval == -1) {
-			zlog_warn ("getmsg(ctl) failed: %s", strerror (errno));
+			zlog_warn ("getmsg(ctl) failed: %s", safe_strerror (errno));
 			goto exit;
 		}
 
@@ -156,7 +156,7 @@
 		if (msgdata.len >= sizeof (struct T_error_ack) &&
 			TLIerr->PRIM_type == T_ERROR_ACK) {
 			zlog_warn ("getmsg(ctl) returned T_ERROR_ACK: %s",
-				strerror ((TLIerr->TLI_error == TSYSERR)
+				safe_strerror ((TLIerr->TLI_error == TSYSERR)
 				? TLIerr->UNIX_error : EPROTO));
 			break;
 		}
@@ -196,7 +196,7 @@
 
 			if (retval == -1) {
 				zlog_warn ("getmsg(data) failed: %s",
-					strerror (errno));
+					safe_strerror (errno));
 				goto exit;
 			}
 
diff --git a/zebra/rtread_proc.c b/zebra/rtread_proc.c
index 320152e..6e021c3 100644
--- a/zebra/rtread_proc.c
+++ b/zebra/rtread_proc.c
@@ -56,7 +56,7 @@
   fp = fopen (_PATH_PROCNET_ROUTE, "r");
   if (fp == NULL)
     {
-      zlog_warn ("Can't open %s : %s\n", _PATH_PROCNET_ROUTE, strerror (errno));
+      zlog_warn ("Can't open %s : %s\n", _PATH_PROCNET_ROUTE, safe_strerror (errno));
       return -1;
     }
   
@@ -111,7 +111,7 @@
   if (fp == NULL)
     {
       zlog_warn ("Can't open %s : %s", _PATH_PROCNET_ROUTE6, 
-		strerror (errno));
+		safe_strerror (errno));
       return -1;
     }
   
diff --git a/zebra/rtread_sysctl.c b/zebra/rtread_sysctl.c
index 970c0aa..78864f2 100644
--- a/zebra/rtread_sysctl.c
+++ b/zebra/rtread_sysctl.c
@@ -48,7 +48,7 @@
   /* Get buffer size. */
   if (sysctl (mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0) 
     {
-      zlog_warn ("sysctl fail: %s", strerror (errno));
+      zlog_warn ("sysctl fail: %s", safe_strerror (errno));
       return -1;
     }
 
@@ -58,7 +58,7 @@
   /* Read routing table information by calling sysctl(). */
   if (sysctl (mib, MIBSIZ, buf, &bufsiz, NULL, 0) < 0) 
     {
-      zlog_warn ("sysctl() fail by %s", strerror (errno));
+      zlog_warn ("sysctl() fail by %s", safe_strerror (errno));
       return -1;
     }
 
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 10dd5fa..09dddf6 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -1369,7 +1369,7 @@
 
   if (client_sock < 0)
     {
-      zlog_warn ("Can't accept zebra socket: %s", strerror (errno));
+      zlog_warn ("Can't accept zebra socket: %s", safe_strerror (errno));
       return -1;
     }
 
@@ -1400,7 +1400,7 @@
 
   if (accept_sock < 0) 
     {
-      zlog_warn ("Can't bind to socket: %s", strerror (errno));
+      zlog_warn ("Can't bind to socket: %s", safe_strerror (errno));
       zlog_warn ("zebra can't provice full functionality due to above error");
       return;
     }
@@ -1423,7 +1423,7 @@
 	       sizeof (struct sockaddr_in));
   if (ret < 0)
     {
-      zlog_warn ("Can't bind to socket: %s", strerror (errno));
+      zlog_warn ("Can't bind to socket: %s", safe_strerror (errno));
       zlog_warn ("zebra can't provice full functionality due to above error");
       close (accept_sock);      /* Avoid sd leak. */
       return;
@@ -1435,7 +1435,7 @@
   ret = listen (accept_sock, 1);
   if (ret < 0)
     {
-      zlog_warn ("Can't listen to socket: %s", strerror (errno));
+      zlog_warn ("Can't listen to socket: %s", safe_strerror (errno));
       zlog_warn ("zebra can't provice full functionality due to above error");
       close (accept_sock);	/* Avoid sd leak. */
       return;
