Get string operations working on 3ds

This commit is contained in:
Andrew Glaze
2025-12-07 12:45:22 -05:00
parent d943c2d074
commit 0acb7c74db
21 changed files with 30432 additions and 23 deletions

18
Shared/source/shims.c Normal file
View File

@@ -0,0 +1,18 @@
#include <stdlib.h>
#include <malloc.h>
#include <errno.h>
int posix_memalign(void **res, size_t align, size_t len) {
if (align < sizeof(void *)) return 22;
void *mem = memalign(align, len);
if (!mem) return errno;
*res = mem;
return 0;
}
int getentropy(void *buffer, size_t length) {
for (int i = 0; i < length; i++) {
((int*)buffer)[i] = rand();
}
return 0;
}