diff options
-rw-r--r-- | sysdeps/posix/telldir.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/posix/telldir.c b/sysdeps/posix/telldir.c index 1bb822c807..57d435ed21 100644 --- a/sysdeps/posix/telldir.c +++ b/sysdeps/posix/telldir.c @@ -23,5 +23,11 @@ long int telldir (DIR *dirp) { - return dirp->filepos; + long int ret; + + __libc_lock_lock (dirp->lock); + ret = dirp->filepos; + __libc_lock_unlock (dirp->lock); + + return ret; } |