Skip to content

Commit

Permalink
libc: add strerrordesc_np
Browse files Browse the repository at this point in the history
Per the specification, strerrordesc_np() is supposed to
return a pointer to a string that describes the error code
passed in the argument errnum just like strerror() does.
However unlike strerror(), strerrordesc_np() is NOT supposed
to apply any translation per current locale.

But the OSv implementation of strerror() does not apply any
translation anyway (please see the LCTRANS macro in locale_impl.h
that returns the msg "as is" without any translation). So given
that we simply make strerrordesc_np an alias of strerror.

The strerrordesc_np() is needed by newer version of nginx.

Signed-off-by: Waldemar Kozaczuk <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
wkozaczuk authored and nyh committed May 25, 2021
1 parent af793ae commit afe3af4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libc/aliases.ld
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ __strndup = strndup;
__stpcpy = stpcpy;
__stpncpy = stpncpy;
__strdup = strdup;
strerrordesc_np = strerror;

/* temp */
__mktemp = mktemp;
Expand Down

0 comments on commit afe3af4

Please sign in to comment.