Skip to content

Commit

Permalink
Only use GNU specific strerror_r() API when __GLIBC__ is defined. (#791)
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitryAndric authored Jun 22, 2023
1 parent 15fb7a7 commit 792fb22
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 792fb22

Please sign in to comment.