Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #include <dirent.h> |
| 2 | #include <unistd.h> |
| 3 | #include "__dirent.h" |
| 4 | #include "libc.h" |
| 5 | |
| 6 | void seekdir(DIR *dir, long off) |
| 7 | { |
Rich Felker | 4750cf4 | 2012-04-24 16:32:23 -0400 | [diff] [blame] | 8 | LOCK(dir->lock); |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 9 | dir->tell = lseek(dir->fd, off, SEEK_SET); |
| 10 | dir->buf_pos = dir->buf_end = 0; |
Rich Felker | 4750cf4 | 2012-04-24 16:32:23 -0400 | [diff] [blame] | 11 | UNLOCK(dir->lock); |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 12 | } |