diff options
| author | Jakob Kaivo <jkk@ung.org> | 2020-08-15 15:53:15 -0400 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2020-08-15 15:53:15 -0400 |
| commit | 1cf3773450f3f03c5fdfb79bf4eb06002567dcbd (patch) | |
| tree | ab473c16d285258aca12e18db2d0dbb42e026859 /src/dirent | |
| parent | cdc0335d77e7b07349f43a63442cdad09bcc15f9 (diff) | |
implement
Diffstat (limited to 'src/dirent')
| -rw-r--r-- | src/dirent/seekdir.c | 4 | ||||
| -rw-r--r-- | src/dirent/telldir.c | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/dirent/seekdir.c b/src/dirent/seekdir.c index 62b1d30b..3cbcfe17 100644 --- a/src/dirent/seekdir.c +++ b/src/dirent/seekdir.c @@ -1,7 +1,11 @@ +#include <sys/types.h> #include <dirent.h> +#include <unistd.h> +#include "_dirent.h" void seekdir(DIR * dirp, long loc) { + lseek(dirp->fd, loc, SEEK_SET); } /* diff --git a/src/dirent/telldir.c b/src/dirent/telldir.c index 4e51810d..0aa8a72c 100644 --- a/src/dirent/telldir.c +++ b/src/dirent/telldir.c @@ -1,8 +1,11 @@ +#include <sys/types.h> #include <dirent.h> +#include <unistd.h> +#include "_dirent.h" long telldir(DIR * dirp) { - return 0; + return lseek(dirp->fd, 0, SEEK_CUR); } /* |
