summary refs log tree commit diff
path: root/sysdeps/unix/rewinddir.c
diff options
context:
space:
mode:
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)