File:  [DVB] / dietlibc / lib / seekdir.c
Revision 1.4: download - view: text, annotated - select for diffs
Tue Apr 4 03:47:21 2006 UTC (18 years, 2 months ago) by leitner
Branches: MAIN
CVS tags: HEAD
  fix telldir, seekdir (Gernot Tenchio)
  also add -lc after -lgcc for gcc 4.1 on arm (Enrico Scholz)

#include "dietdirent.h"
#include <unistd.h>
#include <dirent.h>

void seekdir(DIR *d,off_t offset) {
  if (lseek(d->fd,offset,SEEK_SET) != (off_t)-1) {
    d->num=d->cur=0;
    ((struct dirent *)(d->buf))->d_off = offset;
  }
}

LinuxTV legacy CVS <linuxtv.org/cvs>