fix: added arc4random_buf stub

this fixes linking error on aarch64
also _seralPutchar was made public to prevent mangling
This commit is contained in:
2026-04-20 21:30:23 +09:00
parent 635052c8dc
commit 350776d5d1
2 changed files with 9 additions and 2 deletions
+6
View File
@@ -34,3 +34,9 @@ int posix_memalign(void** ptr, unsigned long align, unsigned long size) {
}
void free(void* ptr) { (void)ptr; }
// Swift stdlib uses arc4random_buf for Hasher seed — stub with zeroes in bare-metal
void arc4random_buf(void* buf, unsigned long nbytes) {
unsigned char* b = (unsigned char*)buf;
while (nbytes--) *b++ = 0;
}