blob: 3c5deca8e3ca789da2d13e412ffe5304000c8cfa [file] [log] [blame]
yuezonghe824eb0c2024-06-27 02:32:26 -07001/*
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
13long 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}