home *** CD-ROM | disk | FTP | other *** search
/ Serving the Web / ServingTheWeb1995.disc1of1.iso / linux / slacksrce / d / libc / libc-4.6 / libc-4 / libc-linux / dirent / seekdir.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-18  |  296 b   |  18 lines

  1. #include <dirent.h>
  2. #include <unistd.h>
  3. #include <errno.h>
  4. #include <syscall.h>
  5. #undef lseek
  6.  
  7. static inline
  8.  _syscall3(off_t,lseek,int,fildes,off_t,offset,int,origin)
  9.  
  10. void seekdir(DIR * dir, off_t offset)
  11. {
  12.   if (!dir) {
  13.     errno = EBADF;
  14.     return;
  15.   }
  16.   lseek(dir->dd_fd,offset,SEEK_SET);
  17. }
  18.