2017-01-27 18:13:41 +01:00
|
|
|
--- AtomicParsley.cpp 2017-01-27 18:09:38.871046030 +0100
|
|
|
|
+++ AtomicParsley.cpp 2017-01-27 18:10:35.548088839 +0100
|
2017-01-27 18:21:16 +01:00
|
|
|
@@ -4585,10 +4585,11 @@
|
2017-01-27 18:13:41 +01:00
|
|
|
#if defined(_MSC_VER)
|
|
|
|
fpos_t file_offset = dest_position + file_pos;
|
|
|
|
#elif defined(__GLIBC__)
|
|
|
|
- fpos_t file_offset = {0};
|
|
|
|
+ fpos_t file_offset = {0};
|
|
|
|
file_offset.__pos = dest_position + file_pos;
|
|
|
|
#else
|
|
|
|
- off_t file_offset = dest_position + file_pos;
|
2017-01-27 18:21:16 +01:00
|
|
|
+ fpos_t file_offset = {0};
|
|
|
|
+ *(uint64_t*) &file_offset = dest_position + file_pos;
|
2017-01-27 18:13:41 +01:00
|
|
|
#endif
|
|
|
|
fsetpos(dest_file, &file_offset);
|
|
|
|
fwrite(buffer, (size_t)max_buffer, 1, dest_file);
|
2017-01-27 18:21:16 +01:00
|
|
|
@@ -4601,10 +4601,11 @@
|
2017-01-27 18:13:41 +01:00
|
|
|
#if defined(_MSC_VER)
|
|
|
|
fpos_t file_offset = dest_position + file_pos;
|
|
|
|
#elif defined(__GLIBC__)
|
|
|
|
- fpos_t file_offset = {0};
|
|
|
|
+ fpos_t file_offset = {0};
|
|
|
|
file_offset.__pos = dest_position + file_pos;
|
|
|
|
#else
|
|
|
|
- off_t file_offset = dest_position + file_pos;
|
2017-01-27 18:21:16 +01:00
|
|
|
+ fpos_t file_offset = {0};
|
|
|
|
+ *(uint64_t*) &file_offset = dest_position + file_pos;
|
2017-01-27 18:13:41 +01:00
|
|
|
#endif
|
|
|
|
fsetpos(dest_file, &file_offset );
|
|
|
|
fwrite(buffer, (size_t)(src_file_size - file_pos), 1, dest_file);
|