This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.26-522-g84d0e6f


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  84d0e6f05212cabe786cdf00bf3ba5d166d077c0 (commit)
      from  ee417882e07277b2a36e7e61e6ef7edd96415b3f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=84d0e6f05212cabe786cdf00bf3ba5d166d077c0

commit 84d0e6f05212cabe786cdf00bf3ba5d166d077c0
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Oct 5 12:20:19 2017 +0200

    support_format_hostent: Add more error information for NETDB_INTERNAL

diff --git a/ChangeLog b/ChangeLog
index bb09add..9cc0df5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-05  Florian Weimer  <fweimer@redhat.com>
+
+	* support/support_format_hostent.c (support_format_hostent): Add
+	more error information for NETDB_INTERNAL.
+
 2017-10-04  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* config.h.in (NO_HIDDEN_EXTERN_FUNC_IN_PIE): New.
diff --git a/support/support_format_hostent.c b/support/support_format_hostent.c
index 5b5f260..88c85ec 100644
--- a/support/support_format_hostent.c
+++ b/support/support_format_hostent.c
@@ -19,6 +19,7 @@
 #include <support/format_nss.h>
 
 #include <arpa/inet.h>
+#include <errno.h>
 #include <stdio.h>
 #include <support/support.h>
 #include <support/xmemstream.h>
@@ -41,10 +42,15 @@ support_format_hostent (struct hostent *h)
 {
   if (h == NULL)
     {
-      char *value = support_format_herrno (h_errno);
-      char *result = xasprintf ("error: %s\n", value);
-      free (value);
-      return result;
+      if (h_errno == NETDB_INTERNAL)
+        return xasprintf ("error: NETDB_INTERNAL (errno %d, %m)\n", errno);
+      else
+        {
+          char *value = support_format_herrno (h_errno);
+          char *result = xasprintf ("error: %s\n", value);
+          free (value);
+          return result;
+        }
     }
 
   struct xmemstream mem;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                        |    5 +++++
 support/support_format_hostent.c |   14 ++++++++++----
 2 files changed, 15 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]