summaryrefslogtreecommitdiff
path: root/nis
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-07 17:36:20 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-07 17:36:20 +0000
commit65302b6ec8c5aa89dbfcb8952ee0fb834a1b1d56 (patch)
tree91ee6e1e02418dc5c4084df722370e2b2e021a06 /nis
parent65d60af0a5097f04accb76b75c49b90d55547c34 (diff)
[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);
}