summaryrefslogtreecommitdiffstats
path: root/src/asr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/asr.c')
-rw-r--r--src/asr.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/asr.c b/src/asr.c
index 9fcb6b3..3800c2b 100644
--- a/src/asr.c
+++ b/src/asr.c
@@ -205,9 +205,8 @@ int asr_perform_validation(asr_client_t asr, const char* filesystem) {
}
#ifdef WIN32
- _fseeki64(file, 0, SEEK_END);
- length = _ftelli64(file);
- _fseeki64(file, 0, SEEK_SET);
+ length = _lseeki64(fileno(file), 0, SEEK_END);
+ _lseeki64(fileno(file), 0, SEEK_SET);
#else
fseeko(file, 0, SEEK_END);
length = ftello(file);
@@ -307,7 +306,7 @@ int asr_handle_oob_data_request(asr_client_t asr, plist_t packet, FILE* file) {
}
#ifdef WIN32
- _fseeki64(file, oob_offset, SEEK_SET);
+ _lseeki64(fileno(file), oob_offset, SEEK_SET);
#else
fseeko(file, oob_offset, SEEK_SET);
#endif
@@ -341,9 +340,8 @@ int asr_send_payload(asr_client_t asr, const char* filesystem) {
}
#ifdef WIN32
- _fseeki64(file, 0, SEEK_END);
- length = _ftelli64(file);
- _fseeki64(file, 0, SEEK_SET);
+ length = _lseeki64(fileno(file), 0, SEEK_END);
+ _lseeki64(fileno(file), 0, SEEK_SET);
#else
fseeko(file, 0, SEEK_END);
length = ftello(file);