libc: core: set up NSD remote channel on startup

This commit is contained in:
2026-05-31 17:20:31 +01:00
parent 474f228c98
commit c9a87457b8
+3 -1
View File
@@ -1,7 +1,8 @@
#include <errno.h>
#include <magenta/log.h>
#include <rosetta/bootstrap.h>
#include <stdio.h>
#include <errno.h>
#include <sys/remote.h>
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)
{
sys_remote_set(SYS_REMOTE_NSD, 0, 0);
(volatile void)pthread_self();
__set_errno(SUCCESS);
return 0;