From af0172162f7c653cad6a11ed1c1a5459bc154465 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 14 Jan 2006 00:58:03 +0000 Subject: hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed --- libc/sysdeps/linux/common/getdents.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libc/sysdeps/linux/common/getdents.c') diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c index 4db513a62..4b85d2c62 100644 --- a/libc/sysdeps/linux/common/getdents.c +++ b/libc/sysdeps/linux/common/getdents.c @@ -28,6 +28,9 @@ #include #include +libc_hidden_proto(memcpy) +libc_hidden_proto(lseek) + #ifndef offsetof #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif @@ -75,7 +78,7 @@ ssize_t attribute_hidden __getdents (int fd, char *buf, size_t nbytes) /* Our heuristic failed. We read too many entries. Reset the stream. */ assert (last_offset != -1); - __lseek(fd, last_offset, SEEK_SET); + lseek(fd, last_offset, SEEK_SET); if ((char *) dp == buf) { /* The buffer the user passed in is too small to hold even @@ -91,7 +94,7 @@ ssize_t attribute_hidden __getdents (int fd, char *buf, size_t nbytes) dp->d_off = kdp->d_off; dp->d_reclen = new_reclen; dp->d_type = DT_UNKNOWN; - __memcpy (dp->d_name, kdp->d_name, + memcpy (dp->d_name, kdp->d_name, kdp->d_reclen - offsetof (struct kernel_dirent, d_name)); dp = (struct dirent *) ((char *) dp + new_reclen); kdp = (struct kernel_dirent *) (((char *) kdp) + kdp->d_reclen); -- cgit v1.2.3