summaryrefslogtreecommitdiff
path: root/nis
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 15:36:23 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 15:36:23 +0000
commiteff61d5bf192516c4b075983fe899ad4ababb312 (patch)
tree2e2a7bc5dbda6484104812518b3e4106eb26d17d /nis
parent8c48ca02cf6bdfea6b1827628c3179fdae8e8d1e (diff)
2007-07-03 Jakub Jelinek <jakub@redhat.com>
[BZ #4702] * nis/nss-default.c: Include errno.h. (init): Preserve errno.
Diffstat (limited to 'nis')
-rw-r--r--nis/nss-default.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/nis/nss-default.c b/nis/nss-default.c
index 577f7c2d47..ab160b210b 100644
--- a/nis/nss-default.c
+++ b/nis/nss-default.c
@@ -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);
}