Scripting: Check for ENOTRECOVERABLE

It's part of "robust mutexes" and may not necessarily be available
(e.g. on NetBSD 9)
This commit is contained in:
nia 2023-11-20 11:23:26 +01:00 committed by Vicki Pfau
parent 6853080b98
commit d75d26bcc9
1 changed files with 2 additions and 0 deletions

View File

@ -28,7 +28,9 @@ static const struct _mScriptSocketErrorMapping {
{ ECONNREFUSED, mSCRIPT_SOCKERR_CONNECTION_REFUSED }, { ECONNREFUSED, mSCRIPT_SOCKERR_CONNECTION_REFUSED },
{ EACCES, mSCRIPT_SOCKERR_DENIED }, { EACCES, mSCRIPT_SOCKERR_DENIED },
{ EPERM, mSCRIPT_SOCKERR_DENIED }, { EPERM, mSCRIPT_SOCKERR_DENIED },
#ifdef ENOTRECOVERABLE
{ ENOTRECOVERABLE, mSCRIPT_SOCKERR_FAILED }, { ENOTRECOVERABLE, mSCRIPT_SOCKERR_FAILED },
#endif
{ ENETUNREACH, mSCRIPT_SOCKERR_NETWORK_UNREACHABLE }, { ENETUNREACH, mSCRIPT_SOCKERR_NETWORK_UNREACHABLE },
{ ETIMEDOUT, mSCRIPT_SOCKERR_TIMEOUT }, { ETIMEDOUT, mSCRIPT_SOCKERR_TIMEOUT },
{ EINVAL, mSCRIPT_SOCKERR_UNSUPPORTED }, { EINVAL, mSCRIPT_SOCKERR_UNSUPPORTED },