1 /*
2  * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
3  *
4  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
5  */
6 
7 #include <dirent.h>
8 #include <errno.h>
9 #include <unistd.h>
10 #include "dirstream.h"
11 
12 
telldir(DIR * dir)13 long int telldir(DIR * dir)
14 {
15 	if (!dir) {
16 		__set_errno(EBADF);
17 		return -1;
18 	}
19 
20 	/* The next entry. */
21 	return dir->dd_nextoff;
22 }
23