]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
[BZ #4702]
authorJakub Jelinek <jakub@redhat.com>
Sat, 7 Jul 2007 17:36:20 +0000 (17:36 +0000)
committerJakub Jelinek <jakub@redhat.com>
Sat, 7 Jul 2007 17:36:20 +0000 (17:36 +0000)
* nis/nss-default.c: Include errno.h.
(init): Preserve errno.

ChangeLog
nis/nss-default.c

index 365f6fa7b8062a61ff4796d00e1a9906ad9feebc..d1a19aab68c8575a68c7b578f9ca4c8ecae586f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-07-03  Jakub Jelinek  <jakub@redhat.com>
+
+       [BZ #4702]
+       * nis/nss-default.c: Include errno.h.
+       (init): Preserve errno.
+
 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/generic/ldsodefs.h (rtld_global): Reorder some elements
index 577f7c2d47fb145da02eae00f5ef49e93b28d332..ab160b210bf6a51e0e25ad2aa8e3d2d3c63e0eea 100644 (file)
@@ -17,6 +17,7 @@
    02111-1307 USA.  */
 
 #include <ctype.h>
+#include <errno.h>
 #include <stdio.h>
 #include <stdio_ext.h>
 #include <stdlib.h>
@@ -54,6 +55,7 @@ static const struct
 static void
 init (void)
 {
+  int saved_errno = errno;
   FILE *fp = fopen (default_nss, "rc");
   if (fp != NULL)
     {
@@ -111,6 +113,7 @@ init (void)
 
       fclose (fp);
     }
+  __set_errno (saved_errno);
 }