3ds stuff
This commit is contained in:
4641
day01/source/day01.swift
Normal file
4641
day01/source/day01.swift
Normal file
File diff suppressed because it is too large
Load Diff
18
day01/source/shims.c
Normal file
18
day01/source/shims.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user