diff options
Diffstat (limited to 'src/dirent/seekdir.c')
-rw-r--r-- | src/dirent/seekdir.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dirent/seekdir.c b/src/dirent/seekdir.c new file mode 100644 index 0000000..81a0e33 --- /dev/null +++ b/src/dirent/seekdir.c @@ -0,0 +1,12 @@ +#include <dirent.h> +#include <unistd.h> +#include "__dirent.h" +#include "libc.h" + +void seekdir(DIR *dir, long off) +{ + LOCK(&dir->lock); + dir->tell = lseek(dir->fd, off, SEEK_SET); + dir->buf_pos = dir->buf_end = 0; + UNLOCK(&dir->lock); +} |