telldir.c 216 B

12345678910111213141516
  1. #include <dirent.h>
  2. #include <errno.h>
  3. #include <unistd.h>
  4. #include "dirstream.h"
  5. long int telldir(DIR * dir)
  6. {
  7. if (!dir) {
  8. __set_errno(EBADF);
  9. return -1;
  10. }
  11. /* The next entry. */
  12. return dir->dd_nextoff;
  13. }