bits/syscall.h: add landlock syscalls from linux v5.13
[musl.git] / src / dirent / rewinddir.c
blob7ddda437213d182bd90b3aa119ca4a43720d6cfc
1 #include <dirent.h>
2 #include <unistd.h>
3 #include "__dirent.h"
4 #include "lock.h"
6 void rewinddir(DIR *dir)
8 LOCK(dir->lock);
9 lseek(dir->fd, 0, SEEK_SET);
10 dir->buf_pos = dir->buf_end = 0;
11 dir->tell = 0;
12 UNLOCK(dir->lock);