summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/stdio.h1
-rw-r--r--src/stdio/fgetpos.c2
-rw-r--r--src/stdio/fsetpos.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/include/stdio.h b/include/stdio.h
index 7c4f9ee4..afadd912 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -49,6 +49,7 @@ extern "C" {
typedef union _G_fpos64_t {
char __opaque[16];
+ long long __lldata;
double __align;
} fpos_t;
diff --git a/src/stdio/fgetpos.c b/src/stdio/fgetpos.c
index c3fa0eb0..6eb361e1 100644
--- a/src/stdio/fgetpos.c
+++ b/src/stdio/fgetpos.c
@@ -4,7 +4,7 @@ int fgetpos(FILE *restrict f, fpos_t *restrict pos)
{
off_t off = __ftello(f);
if (off < 0) return -1;
- *(off_t *)pos = off;
+ *(long long *)pos = off;
return 0;
}
diff --git a/src/stdio/fsetpos.c b/src/stdio/fsetpos.c
index 5d76c8cd..6310424e 100644
--- a/src/stdio/fsetpos.c
+++ b/src/stdio/fsetpos.c
@@ -2,7 +2,7 @@
int fsetpos(FILE *f, const fpos_t *pos)
{
- return __fseeko(f, *(const off_t *)pos, SEEK_SET);
+ return __fseeko(f, *(const long long *)pos, SEEK_SET);
}
LFS64(fsetpos);