Skip to content

Commit

Permalink
Merge pull request #21162 from maribu/sys/tiny_strerror/fix-compilati…
Browse files Browse the repository at this point in the history
…on-picolibc-ubuntu

sys/tiny_strerror: fix compilation with picolibc on Ubuntu
  • Loading branch information
benpicco authored Jan 24, 2025
2 parents 139404d + 28caf32 commit 95c0a62
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sys/tiny_strerror/tiny_strerror.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ static FLASH_ATTR const char _edquot[] = "-EDQUOT";
static FLASH_ATTR const char _eexist[] = "-EEXIST";
static FLASH_ATTR const char _efault[] = "-EFAULT";
static FLASH_ATTR const char _efbig[] = "-EFBIG";
#ifdef EHOSTDOWN /* not part of POSIX and not universally available */
static FLASH_ATTR const char _ehostdown[] = "-EHOSTDOWN";
#endif
static FLASH_ATTR const char _ehostunreach[] = "-EHOSTUNREACH";
static FLASH_ATTR const char _eidrm[] = "-EIDRM";
static FLASH_ATTR const char _eilseq[] = "-EILSEQ";
Expand Down Expand Up @@ -93,7 +95,9 @@ static FLASH_ATTR const char _enxio[] = "-ENXIO";
static FLASH_ATTR const char _eoverflow[] = "-EOVERFLOW";
static FLASH_ATTR const char _eownerdead[] = "-EOWNERDEAD";
static FLASH_ATTR const char _eperm[] = "-EPERM";
#ifdef EPFNOSUPPORT /* not part of POSIX and not universally available */
static FLASH_ATTR const char _epfnosupport[] = "-EPFNOSUPPORT";
#endif
static FLASH_ATTR const char _epipe[] = "-EPIPE";
static FLASH_ATTR const char _eprotonosupport[] = "-EPROTONOSUPPORT";
static FLASH_ATTR const char _eprototype[] = "-EPROTOTYPE";
Expand All @@ -105,7 +109,9 @@ static FLASH_ATTR const char _esrch[] = "-ESRCH";
static FLASH_ATTR const char _estale[] = "-ESTALE";
static FLASH_ATTR const char _etimedout[] = "-ETIMEDOUT";
static FLASH_ATTR const char _etime[] = "-ETIME";
#ifdef ETOOMANYREFS /* not part of POSIX and not universally available */
static FLASH_ATTR const char _etoomanyrefs[] = "-ETOOMANYREFS";
#endif
static FLASH_ATTR const char _etxtbsy[] = "-ETXTBSY";
static FLASH_ATTR const char _exdev[] = "-EXDEV";
/* EAGAIN and EWOULDBLOCK have the exact same meaning and consequently may
Expand Down Expand Up @@ -143,7 +149,9 @@ static FLASH_ATTR const char * FLASH_ATTR const lookup[] = {
[EEXIST] = _eexist,
[EFAULT] = _efault,
[EFBIG] = _efbig,
#ifdef EHOSTDOWN /* not part of POSIX and not universally available */
[EHOSTDOWN] = _ehostdown,
#endif
[EHOSTUNREACH] = _ehostunreach,
[EIDRM] = _eidrm,
[EILSEQ] = _eilseq,
Expand Down Expand Up @@ -188,7 +196,9 @@ static FLASH_ATTR const char * FLASH_ATTR const lookup[] = {
[EOVERFLOW] = _eoverflow,
[EOWNERDEAD ] = _eownerdead,
[EPERM] = _eperm,
#ifdef EPFNOSUPPORT /* not part of POSIX and not universally available */
[EPFNOSUPPORT] = _epfnosupport,
#endif
[EPIPE] = _epipe,
[EPROTONOSUPPORT] = _eprotonosupport,
[EPROTOTYPE] = _eprototype,
Expand All @@ -200,7 +210,9 @@ static FLASH_ATTR const char * FLASH_ATTR const lookup[] = {
[ESTALE] = _estale,
[ETIMEDOUT] = _etimedout,
[ETIME] = _etime,
#ifdef ETOOMANYREFS /* not part of POSIX and not universally available */
[ETOOMANYREFS] = _etoomanyrefs,
#endif
[ETXTBSY] = _etxtbsy,
[EXDEV] = _exdev,
#if EAGAIN != EWOULDBLOCK
Expand Down

0 comments on commit 95c0a62

Please sign in to comment.