libc: core: set up NSD remote channel on startup
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
|
#include <errno.h>
|
||||||
#include <magenta/log.h>
|
#include <magenta/log.h>
|
||||||
#include <rosetta/bootstrap.h>
|
#include <rosetta/bootstrap.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <sys/remote.h>
|
||||||
|
|
||||||
extern int main(int, const char **, const char **);
|
extern int main(int, const char **, const char **);
|
||||||
|
|
||||||
@@ -13,6 +14,7 @@ void *__attribute__((weak)) pthread_self(void)
|
|||||||
|
|
||||||
int __libc_init(const struct rosetta_bootstrap *bsinfo)
|
int __libc_init(const struct rosetta_bootstrap *bsinfo)
|
||||||
{
|
{
|
||||||
|
sys_remote_set(SYS_REMOTE_NSD, 0, 0);
|
||||||
(volatile void)pthread_self();
|
(volatile void)pthread_self();
|
||||||
__set_errno(SUCCESS);
|
__set_errno(SUCCESS);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user