diff options
Diffstat (limited to 'lib/libc/string')
| -rw-r--r-- | lib/libc/string/__strerror.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/string/__strerror.c b/lib/libc/string/__strerror.c index 59cee14a006..241df192625 100644 --- a/lib/libc/string/__strerror.c +++ b/lib/libc/string/__strerror.c @@ -1,4 +1,4 @@ -/* $NetBSD: __strerror.c,v 1.16 1999/09/20 04:39:43 lukem Exp $ */ +/* $NetBSD: __strerror.c,v 1.17 2001/08/24 00:11:54 yamt Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -38,7 +38,7 @@ #if 0 static char *sccsid = "@(#)strerror.c 5.6 (Berkeley) 5/4/91"; #else -__RCSID("$NetBSD: __strerror.c,v 1.16 1999/09/20 04:39:43 lukem Exp $"); +__RCSID("$NetBSD: __strerror.c,v 1.17 2001/08/24 00:11:54 yamt Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -70,6 +70,7 @@ __strerror(num, buf, buflen) unsigned int errnum; #ifdef NLS + int saved_errno = errno; nl_catd catd ; catd = catopen("libc", 0); #endif @@ -95,6 +96,7 @@ __strerror(num, buf, buflen) #ifdef NLS catclose(catd); + errno = saved_errno; #endif return buf; |
