diff --git a/tests/data/multiboot/libc.c b/tests/data/multiboot/libc.c index 6df9bda..43502f5 100644 --- a/tests/data/multiboot/libc.c +++ b/tests/data/multiboot/libc.c @@ -34,6 +34,16 @@ void* memcpy(void *dest, const void *src, int n) return dest; } +void* memset(void *b, int c, unsigned len) +{ + char *bb; + + for (bb = (char *)b; len--; ) + *bb++ = c; + + return (b); +} + static void print_char(char c) { outb(0xe9, c); diff --git a/tests/data/multiboot/libc.h b/tests/data/multiboot/libc.h index 04c9922..b16cf64 100644 --- a/tests/data/multiboot/libc.h +++ b/tests/data/multiboot/libc.h @@ -58,5 +58,6 @@ static inline void outb(uint16_t port, uint8_t data) void printf(const char *fmt, ...); void* memcpy(void *dest, const void *src, int n); +void* memset(void *b, int c, unsigned len); #endif