diff options
Diffstat (limited to 'libc/debian/patches')
-rw-r--r-- | libc/debian/patches/libc-add-gnu-strerror_r.patch | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libc/debian/patches/libc-add-gnu-strerror_r.patch b/libc/debian/patches/libc-add-gnu-strerror_r.patch index b6c87f8..a47a766 100644 --- a/libc/debian/patches/libc-add-gnu-strerror_r.patch +++ b/libc/debian/patches/libc-add-gnu-strerror_r.patch @@ -1,7 +1,7 @@ -Index: b/usr/src/lib/libc/port/gen/strerror.c +Index: libc/usr/src/lib/libc/port/gen/strerror.c =================================================================== ---- a/usr/src/lib/libc/port/gen/strerror.c -+++ b/usr/src/lib/libc/port/gen/strerror.c +--- libc.orig/usr/src/lib/libc/port/gen/strerror.c ++++ libc/usr/src/lib/libc/port/gen/strerror.c @@ -32,6 +32,7 @@ #include "lint.h" @@ -19,16 +19,16 @@ Index: b/usr/src/lib/libc/port/gen/strerror.c +gnu_strerror_r(int errnum, char *buf, size_t buflen) +{ + if (errnum < 0 || errnum >= _sys_num_err) { -+ const char *unknown = _libc_gettext("Unknown error"); -+ (void) snprintf(buf, buflen, "%s %d", unknown, errnum); -+ return buf; -+ } -+ return _libc_gettext((char *)&_sys_errs[_sys_index[errnum]]); ++ const char *unknown = _libc_gettext("Unknown error"); ++ (void) snprintf(buf, buflen, "%s %d", unknown, errnum); ++ return buf; ++ } ++ return _libc_gettext((char *)&_sys_errs[_sys_index[errnum]]); +} -Index: b/usr/src/lib/libc/port/mapfile-vers +Index: libc/usr/src/lib/libc/port/mapfile-vers =================================================================== ---- a/usr/src/lib/libc/port/mapfile-vers -+++ b/usr/src/lib/libc/port/mapfile-vers +--- libc.orig/usr/src/lib/libc/port/mapfile-vers ++++ libc/usr/src/lib/libc/port/mapfile-vers @@ -275,6 +275,7 @@ SYMBOL_VERSION DYSON_1 { error_one_per_line; error_print_progname; @@ -37,10 +37,10 @@ Index: b/usr/src/lib/libc/port/mapfile-vers mempcpy; memrchr; program_invocation_name; -Index: b/usr/src/head/string.h +Index: libc/usr/src/head/string.h =================================================================== ---- a/usr/src/head/string.h -+++ b/usr/src/head/string.h +--- libc.orig/usr/src/head/string.h ++++ libc/usr/src/head/string.h @@ -69,7 +69,14 @@ extern "C" { #if defined(__EXTENSIONS__) || \ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ |