move gcc required functions to string.c

This commit is contained in:
Liam Kerr 2026-02-09 03:44:33 +00:00
parent 9f833ca32c
commit a6638d7af5
3 changed files with 16 additions and 8 deletions

10
src/lib/string.c Normal file
View file

@ -0,0 +1,10 @@
#include <stddef.h>
#include "string.h"
void *memset(void *s, int c, size_t n) {
unsigned char *p = s;
while (n--) {
*p++ = (unsigned char)c;
}
return s;
}