Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only use GNU specific strerror_r() API when __GLIBC__ is defined. #791

Merged
merged 1 commit into from
Jun 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,8 @@ char *cleanpath(char *path) {

const char *xstrerror(int errnum, char *buf, size_t len) {
#ifdef HAVE_STRERROR_R
# ifdef __USE_GNU
/* Annoying linux specific API contract */
# if defined(__USE_GNU) && defined(__GLIBC__)
/* Annoying GNU specific API contract */
return strerror_r(errnum, buf, len);
# else
strerror_r(errnum, buf, len);
Expand Down