Errors.h: Add ESOCKTNOSUPPORT.

It's in POSIX.1-2024, see
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/errno.h.html

Fixes #19347.
This commit is contained in:
Augustin Cavalier 2025-01-08 11:35:35 -05:00
parent 2a6dd3744d
commit 8ecc31ca7b
4 changed files with 7 additions and 0 deletions

View File

@ -185,6 +185,7 @@
#define HAIKU_ENOATTR B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 60)
#define HAIKU_ENOTRECOVERABLE B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 61)
#define HAIKU_EOWNERDEAD B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 62)
#define HAIKU_ESOCKTNOSUPPORT B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 63)
/* B_NO_MEMORY (0x80000000) can't be negated, so it needs special handling */
#define HAIKU_ENOMEM B_NO_MEMORY

View File

@ -189,6 +189,7 @@
#define ENOATTR B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 60)
#define ENOTRECOVERABLE B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 61)
#define EOWNERDEAD B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 62)
#define ESOCKTNOSUPPORT B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 63)
/* B_NO_MEMORY (0x80000000) can't be negated, so it needs special handling */
#ifdef B_USE_POSITIVE_POSIX_ERRORS

View File

@ -295,6 +295,9 @@ struct error_pair {
#endif
#ifdef EOWNERDEAD
E(EOWNERDEAD),
#endif
#ifdef ESOCKTNOSUPPORT
E(ESOCKTNOSUPPORT),
#endif
E(EWOULDBLOCK),
E(EXDEV),

View File

@ -536,6 +536,8 @@ error_description(int error)
return "State not recoverable";
case EOWNERDEAD:
return "Previous owner died";
case ESOCKTNOSUPPORT:
return "Socket type not supported";
default:
return NULL;