1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
diff --git a/src/parsley.cpp b/src/parsley.cpp
index 3031711..8a4a7a1 100644
--- a/src/parsley.cpp
+++ b/src/parsley.cpp
@@ -4388,7 +4388,8 @@ void APar_MergeTempFile(FILE* dest_file, FILE *src_file, uint64_t src_file_size,
fpos_t file_offset = {0};
file_offset.__pos = dest_position + file_pos;
#else
- off_t file_offset = dest_position + file_pos;
+ fpos_t file_offset = {0};
+ *(uint64_t*) &file_offset = dest_position + file_pos;
#endif
fsetpos(dest_file, &file_offset);
fwrite(buffer, max_buffer, 1, dest_file);
@@ -4403,7 +4404,8 @@ void APar_MergeTempFile(FILE* dest_file, FILE *src_file, uint64_t src_file_size,
fpos_t file_offset = {0};
file_offset.__pos = dest_position + file_pos;
#else
- off_t file_offset = dest_position + file_pos;
+ fpos_t file_offset = {0};
+ *(uint64_t*) &file_offset = dest_position + file_pos;
#endif
fsetpos(dest_file, &file_offset );
fwrite(buffer, src_file_size - file_pos, 1, dest_file);
|