/* Returns the "position" in the "directory stream" which can be used with seekdir to go back to an old entry. We simply return the value in stat.  */
long _ttelldir(_TDIR *dirp)
/* Returns the "position" in the "directory stream" which can be used with seekdir to go back to an old entry. We simply return the value in stat.  */
long _ttelldir(_TDIR *dirp)
{
  errno = 0;
  if (!dirp)
    {
      errno = EFAULT;
      return -1;
    }
  return dirp->dd_stat;
}