Add EACCES errno to SetPosixErrno

Seen in Gravity Rush.
Also reorganizes the switch case based on the posix errno value, since ordering by errno makes no sense on some OSes.
This commit is contained in:
Stephen Miller 2025-02-27 16:32:38 -06:00 committed by GitHub
parent d99289690c
commit 7916dadfce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,12 +93,15 @@ void SetPosixErrno(int e) {
case ENOENT:
g_posix_errno = POSIX_ENOENT;
break;
case EAGAIN:
g_posix_errno = POSIX_EAGAIN;
case EDEADLK:
g_posix_errno = POSIX_EDEADLK;
break;
case ENOMEM:
g_posix_errno = POSIX_ENOMEM;
break;
case EACCES:
g_posix_errno = POSIX_EACCES;
break;
case EINVAL:
g_posix_errno = POSIX_EINVAL;
break;
@ -108,8 +111,8 @@ void SetPosixErrno(int e) {
case ERANGE:
g_posix_errno = POSIX_ERANGE;
break;
case EDEADLK:
g_posix_errno = POSIX_EDEADLK;
case EAGAIN:
g_posix_errno = POSIX_EAGAIN;
break;
case ETIMEDOUT:
g_posix_errno = POSIX_ETIMEDOUT;