diff --git a/sys/libkern/strdup.c b/sys/libkern/strdup.c --- a/sys/libkern/strdup.c +++ b/sys/libkern/strdup.c @@ -46,7 +46,7 @@ copy = malloc(len, type, flags); if (copy == NULL) return (NULL); - bcopy(string, copy, len); + memcpy(copy, string, len); return (copy); } diff --git a/sys/libkern/strndup.c b/sys/libkern/strndup.c --- a/sys/libkern/strndup.c +++ b/sys/libkern/strndup.c @@ -42,7 +42,7 @@ len = strnlen(string, maxlen) + 1; copy = malloc(len, type, M_WAITOK); - bcopy(string, copy, len); + memcpy(copy, string, len); copy[len - 1] = '\0'; return (copy); }