Skip to content

Commit 5a71662

Browse files
committed
fix: stub getentropy and mkdir
1 parent a6eb320 commit 5a71662

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

newlib/libc/sys/hermit/crt0.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <reent.h>
3232
#include "syscall.h"
3333

34+
3435
extern int main(int argc, char** argv);
3536
extern void __libc_init_array(void);
3637
extern void __libc_fini_array (void);
@@ -86,6 +87,12 @@ void _free_r(struct _reent* r, void* ptr) {
8687
}
8788
}
8889

90+
int getentropy(void *ptr, __size_t n) { return -1; };
91+
92+
int32_t mkdir(const char *name, uint32_t mode) {
93+
return sys_mkdir(name, mode);
94+
}
95+
8996
void runtime_entry(int argc, char** argv, char** env)
9097
{
9198
int ret;

newlib/libc/sys/hermit/syscall.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ int swapcontext(ucontext_t *oucp, const ucontext_t *ucp);
159159
int getcontext(ucontext_t *ucp);
160160
int setcontext(ucontext_t *ucp);
161161

162+
int32_t sys_mkdir(const char *name, uint32_t mode);
163+
162164
#define __NR_exit 0
163165
#define __NR_write 1
164166
#define __NR_open 2

0 commit comments

Comments
 (0)