#include "memory.h" namespace std { enum class __attribute__ ((__type_visibility("default"))) align_val_t : size_t { }; } // Implementation of memset and memcpy because we're not // linking libc into the kernel extern "C" { void * memset(void *s, uint8_t v, size_t n) { uint8_t *p = reinterpret_cast(s); for (size_t i = 0; i < n; ++i) p[i] = v; return s; } void * memcpy(void *dest, const void *src, size_t n) { const uint8_t *s = reinterpret_cast(src); uint8_t *d = reinterpret_cast(dest); for (size_t i = 0; i < n; ++i) d[i] = s[i]; return d; } }