diff options
Diffstat (limited to 'libc-top-half/musl/src/stdio/fgetpos.c')
-rw-r--r-- | libc-top-half/musl/src/stdio/fgetpos.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/stdio/fgetpos.c b/libc-top-half/musl/src/stdio/fgetpos.c new file mode 100644 index 0000000..50813d2 --- /dev/null +++ b/libc-top-half/musl/src/stdio/fgetpos.c @@ -0,0 +1,11 @@ +#include "stdio_impl.h" + +int fgetpos(FILE *restrict f, fpos_t *restrict pos) +{ + off_t off = __ftello(f); + if (off < 0) return -1; + *(long long *)pos = off; + return 0; +} + +weak_alias(fgetpos, fgetpos64); |