summaryrefslogtreecommitdiff
path: root/libc/stdio/fgetpos.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio/fgetpos.c')
-rw-r--r--libc/stdio/fgetpos.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/stdio/fgetpos.c b/libc/stdio/fgetpos.c
index 84cf0b98c..03c18ab93 100644
--- a/libc/stdio/fgetpos.c
+++ b/libc/stdio/fgetpos.c
@@ -7,6 +7,10 @@
#include "_stdio.h"
+#ifndef __DO_LARGEFILE
+#define FTELL __ftell
+#endif
+
int fgetpos(FILE * __restrict stream, register fpos_t * __restrict pos)
{
#ifdef __STDIO_MBSTATE
@@ -16,7 +20,7 @@ int fgetpos(FILE * __restrict stream, register fpos_t * __restrict pos)
__STDIO_AUTO_THREADLOCK(stream);
- if ((pos->__pos = ftell(stream)) >= 0) {
+ if ((pos->__pos = FTELL(stream)) >= 0) {
__COPY_MBSTATE(&(pos->__mbstate), &(stream->__state));
pos->__mblen_pending = stream->__ungot_width[0];
retval = 0;
@@ -28,7 +32,7 @@ int fgetpos(FILE * __restrict stream, register fpos_t * __restrict pos)
#else
- return ((pos->__pos = ftell(stream)) >= 0) ? 0 : -1;
+ return ((pos->__pos = FTELL(stream)) >= 0) ? 0 : -1;
#endif
}