libc: core: initialise errno to SUCCESS
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include <errno.h>
|
||||
#include <mango/status.h>
|
||||
|
||||
static int __errno = 32;
|
||||
static int __errno = SUCCESS;
|
||||
|
||||
int __attribute__((weak)) * __errno_location(void)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <mango/log.h>
|
||||
#include <rosetta/bootstrap.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
extern int main(int, const char **, const char **);
|
||||
|
||||
@@ -13,5 +14,6 @@ void *__attribute__((weak)) pthread_self(void)
|
||||
int __libc_init(const struct rosetta_bootstrap *bsinfo)
|
||||
{
|
||||
(volatile void)pthread_self();
|
||||
__set_errno(SUCCESS);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user