getservbyport_r: fix out-of-bounds buffer read
[musl] / src / dirent / rewinddir.c
index c6138f7..7ddda43 100644 (file)
@@ -1,13 +1,13 @@
 #include <dirent.h>
 #include <unistd.h>
 #include "__dirent.h"
-#include "libc.h"
+#include "lock.h"
 
 void rewinddir(DIR *dir)
 {
-       LOCK(&dir->lock);
+       LOCK(dir->lock);
        lseek(dir->fd, 0, SEEK_SET);
        dir->buf_pos = dir->buf_end = 0;
        dir->tell = 0;
-       UNLOCK(&dir->lock);
+       UNLOCK(dir->lock);
 }