Workaround for errno

This commit is contained in:
Alex 2023-05-04 04:59:19 +03:00
parent 7c51807812
commit 4953000370
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
2 changed files with 5 additions and 3 deletions

View File

@ -131,7 +131,7 @@
#define EOWNERDEAD 130 /* Owner died */
#define ENOTRECOVERABLE 131 /* State not recoverable */
extern int *__errno_location(void) __attribute__((const));
extern int *__errno_location(void) __attribute__((const)) __attribute__ ((__nothrow__));
#define errno (*__errno_location())
#endif

View File

@ -1,6 +1,8 @@
#include <errno.h>
int __local_stub_errno = 0;
int *__errno_location(void)
{
return 0;
}
return &__local_stub_errno;
}