summaryrefslogtreecommitdiff
path: root/libc/misc/dirent/readdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/dirent/readdir.c')
-rw-r--r--libc/misc/dirent/readdir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libc/misc/dirent/readdir.c b/libc/misc/dirent/readdir.c
index b9f5f55bd..d74f9abb7 100644
--- a/libc/misc/dirent/readdir.c
+++ b/libc/misc/dirent/readdir.c
@@ -18,8 +18,8 @@ struct dirent *readdir(DIR * dir)
return NULL;
}
-#ifdef _POSIX_THREADS
- pthread_mutex_lock(dir->dd_lock);
+#ifdef __UCLIBC_HAS_THREADS__
+ pthread_mutex_lock(&(dir->dd_lock));
#endif
do {
@@ -46,8 +46,8 @@ struct dirent *readdir(DIR * dir)
} while (de->d_ino == 0);
all_done:
-#ifdef _POSIX_THREADS
- pthread_mutex_unlock(dir->dd_lock);
+#ifdef __UCLIBC_HAS_THREADS__
+ pthread_mutex_unlock(&(dir->dd_lock));
#endif
return de;
}