about summary refs log tree commit diff
path: root/sysdeps/unix/seekdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/seekdir.c')
-rw-r--r--sysdeps/unix/seekdir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/unix/seekdir.c b/sysdeps/unix/seekdir.c
index 9ce332b400..b1201f6b6c 100644
--- a/sysdeps/unix/seekdir.c
+++ b/sysdeps/unix/seekdir.c
@@ -27,7 +27,9 @@ Cambridge, MA 02139, USA.  */
 void
 DEFUN(seekdir, (dirp, pos), DIR *dirp AND __off_t pos)
 {
+  __libc_lock_lock (dirp->lock);
   (void) __lseek(dirp->fd, pos, SEEK_SET);
   dirp->size = 0;
   dirp->offset = 0;
+  __libc_lock_unlock (dirp->lock);
 }