blob: 5be47d4a15564178eb84e73a0d9a9569fd8b30b3 [file] [log] [blame]
Rich Felker0b44a032011-02-12 00:22:29 -05001#include <dirent.h>
2#include <unistd.h>
3#include "__dirent.h"
4#include "libc.h"
5
6void seekdir(DIR *dir, long off)
7{
Rich Felker4750cf42012-04-24 16:32:23 -04008 LOCK(dir->lock);
Rich Felker0b44a032011-02-12 00:22:29 -05009 dir->tell = lseek(dir->fd, off, SEEK_SET);
10 dir->buf_pos = dir->buf_end = 0;
Rich Felker4750cf42012-04-24 16:32:23 -040011 UNLOCK(dir->lock);
Rich Felker0b44a032011-02-12 00:22:29 -050012}