summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/lib/seekdir.c
blob: f8305225000678a8e74d5acd95a3c8da84368241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <unistd.h>
#include <errno.h>

#include "dirstream.h"

#undef seekdir
void seekdir(DIR * dir, off_t offset)
{
  if (!dir) {
    errno = EBADF;
    return;
  }
  dir->dd_nextoff = lseek(dir->dd_fd, offset, SEEK_SET);
  dir->dd_size = dir->dd_nextloc = 0;
}