#include <string.h>

void * memset(void * buf, unsigned char ch, size_t count)  {
    unsigned char * ret = buf;

    while (count--)
        *ret++ = ch;

    return buf;
}