summaryrefslogtreecommitdiff
path: root/libc/misc/dirent/telldir.c
blob: 124030431f0a0748d388c26a7002014ff373bf9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <dirent.h>
#include <errno.h>
#include <unistd.h>
#include "dirstream.h"


long int telldir(DIR * dir)
{
	if (!dir) {
		__set_errno(EBADF);
		return -1;
	}

	/* The next entry. */
	return dir->dd_nextoff;
}