diff options
Diffstat (limited to 'sysdeps/mach/hurd/seekdir.c')
-rw-r--r-- | sysdeps/mach/hurd/seekdir.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/seekdir.c b/sysdeps/mach/hurd/seekdir.c index fa4f1f4f52..a44ac7d246 100644 --- a/sysdeps/mach/hurd/seekdir.c +++ b/sysdeps/mach/hurd/seekdir.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,10 +27,12 @@ Cambridge, MA 02139, USA. */ void DEFUN(seekdir, (dirp, pos), DIR *dirp AND __off_t pos) { + __libc_lock_lock (dirp->__lock); /* Change our entry index pointer to POS and discard any data already read. The next `readdir' call will notice the empty block and read anew from the location in DIRP->__entry_ptr and reset the other state variables. */ dirp->__entry_ptr = pos; dirp->__size = 0; + __libc_lock_unlock (dirp->__lock); } |