diff options
author | Nikias Bassen | 2019-02-02 03:15:25 +0100 |
---|---|---|
committer | Nikias Bassen | 2019-02-02 03:15:25 +0100 |
commit | 8aa4246ddef30c0e114362b6ef2a8e6ee0ed3817 (patch) | |
tree | acb1203e8868f33d651972f0aadfb6775e92cc95 /src/asr.c | |
parent | 8a4cc41e2e2caa080713f321ad9c98338a0e50f5 (diff) | |
download | idevicerestore-8aa4246ddef30c0e114362b6ef2a8e6ee0ed3817.tar.gz idevicerestore-8aa4246ddef30c0e114362b6ef2a8e6ee0ed3817.tar.bz2 |
win32: Use _lseeki64 instead of _fseeki64/_ftelli64 and don't link against msvcr100.dll
What a mess it is, all these msvcr*.dll - incompatible without limits
Diffstat (limited to 'src/asr.c')
-rw-r--r-- | src/asr.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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); |