build: add a "user" arch to allow the kernel to run as a program on the host machine
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#include <stddef.h>
|
||||
|
||||
const void *memchr(const void *ptr, int value, size_t num) {
|
||||
void *memchr(const void *ptr, int value, unsigned long num) {
|
||||
const unsigned char *buf = ptr;
|
||||
unsigned char val = value;
|
||||
|
||||
for (size_t i = 0; i < num; i++) {
|
||||
for (unsigned long i = 0; i < num; i++) {
|
||||
if (buf[i] == val) {
|
||||
return (void *)(buf + i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user