diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c index a1c46209df71..e7b9a2b9aff2 100644 --- a/sys/boot/i386/boot2/boot2.c +++ b/sys/boot/i386/boot2/boot2.c @@ -139,12 +139,15 @@ static int xputc(int); static int xgetc(int); static int getc(int); -static void memcpy(char *, const char *, int); +static void memcpy(void *, const void *, int); static void -memcpy(char *dst, const char *src, int len) +memcpy(void *dst, const void *src, int len) { + const char *s = src; + char *d = dst; + while (len--) - *dst++ = *src++; + *d++ = *s++; } static inline int diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c index a1c46209df71..e7b9a2b9aff2 100644 --- a/sys/boot/i386/gptboot/gptboot.c +++ b/sys/boot/i386/gptboot/gptboot.c @@ -139,12 +139,15 @@ static int xputc(int); static int xgetc(int); static int getc(int); -static void memcpy(char *, const char *, int); +static void memcpy(void *, const void *, int); static void -memcpy(char *dst, const char *src, int len) +memcpy(void *dst, const void *src, int len) { + const char *s = src; + char *d = dst; + while (len--) - *dst++ = *src++; + *d++ = *s++; } static inline int