use memcpy instead of bcopy

memcpy is ANSI C89, bcopy seems to be an history BSD function.
This commit is contained in:
Omar Polo 2021-04-25 12:49:21 +00:00
parent 5aba63956a
commit b5fdc32e75
1 changed files with 1 additions and 1 deletions

2
dirs.c
View File

@ -129,7 +129,7 @@ scandir_fd(int fd, struct dirent ***namelist,
p->d_ino = d->d_ino;
p->d_type = d->d_type;
p->d_reclen = d->d_reclen;
bcopy(d->d_name, p->d_name, namlen + 1);
memcpy(p->d_name, d->d_name, namlen + 1);
names[nitems++] = p;
}
closedir(dirp);