diff options
Diffstat (limited to '')
-rw-r--r-- | user/lib/fseek.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/user/lib/fseek.c b/user/lib/fseek.c new file mode 100644 index 0000000..a7a3377 --- /dev/null +++ b/user/lib/fseek.c @@ -0,0 +1,16 @@ +#include <stdio.h> +#include <unistd.h> + +int fseek(FILE *stream, long off, int whence) +{ + int fd; + fd = (uintptr_t)stream; + return seek(fd, off, whence); +} + +long ftell(FILE *stream) +{ + int fd; + fd = (uintptr_t)stream; + return seek(fd, 0, SEEK_CUR); +} |