aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/rewinddir.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-05-08 14:53:20 -0400
committerUlrich Drepper <drepper@gmail.com>2011-05-08 14:53:20 -0400
commit6fb2dde3f1aa3a1419cb6c2dfa53dd1d506722a4 (patch)
tree1ea14aa26ff3a32c8c14bf1849b7d94fbf685069 /sysdeps/unix/rewinddir.c
parent7fb90fb89bbdf273ab7ab96517fe1b156cd7aee1 (diff)
downloadglibc-6fb2dde3f1aa3a1419cb6c2dfa53dd1d506722a4.tar
glibc-6fb2dde3f1aa3a1419cb6c2dfa53dd1d506722a4.tar.gz
glibc-6fb2dde3f1aa3a1419cb6c2dfa53dd1d506722a4.tar.bz2
glibc-6fb2dde3f1aa3a1419cb6c2dfa53dd1d506722a4.zip
Make complete getcwd work in rtld
Diffstat (limited to 'sysdeps/unix/rewinddir.c')
-rw-r--r--sysdeps/unix/rewinddir.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/unix/rewinddir.c b/sysdeps/unix/rewinddir.c
index 89b0e6d20d..967289364e 100644
--- a/sysdeps/unix/rewinddir.c
+++ b/sysdeps/unix/rewinddir.c
@@ -23,16 +23,19 @@
#include <dirstream.h>
/* Rewind DIRP to the beginning of the directory. */
-/* XXX should be __rewinddir ? */
void
rewinddir (dirp)
DIR *dirp;
{
+#ifndef NOT_IN_libc
__libc_lock_lock (dirp->lock);
+#endif
(void) __lseek (dirp->fd, (off_t) 0, SEEK_SET);
dirp->filepos = 0;
dirp->offset = 0;
dirp->size = 0;
+#ifndef NOT_IN_libc
__libc_lock_unlock (dirp->lock);
+#endif
}
libc_hidden_def (rewinddir)