gtkpod: fix musl builds

This commit is contained in:
q66 2019-12-18 22:14:16 +01:00
parent c94c52e182
commit de4c5f31a9
2 changed files with 24 additions and 4 deletions

View file

@ -0,0 +1,24 @@
This is an awful hack done by inspecting what musl does.
--- libs/atomic-parsley/AtomicParsley.cpp
+++ libs/atomic-parsley/AtomicParsley.cpp
@@ -4935,7 +4935,8 @@ void APar_MergeTempFile(FILE* dest_file, FILE *src_file, uint32_t src_file_size,
{ 0 };
file_offset.__pos = dest_position + file_pos;
#else
- off_t file_offset = dest_position + file_pos;
+ fpos_t file_offset = {0};
+ *((long long *)&file_offset) = dest_position + file_pos;
#endif
fsetpos(dest_file, &file_offset);
fwrite(buffer, (size_t) max_buffer, 1, dest_file);
@@ -4952,7 +4953,8 @@ void APar_MergeTempFile(FILE* dest_file, FILE *src_file, uint32_t src_file_size,
{ 0 };
file_offset.__pos = dest_position + file_pos;
#else
- off_t file_offset = dest_position + file_pos;
+ fpos_t file_offset = {0};
+ *((long long *)&file_offset) = dest_position + file_pos;
#endif
fsetpos(dest_file, &file_offset);
fwrite(buffer, (size_t) (src_file_size - file_pos), 1, dest_file);

View file

@ -14,7 +14,3 @@ license="GPL-2.0-or-later"
homepage="http://www.gtkpod.org/libgpod"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=a57dc8ae9138e0cb4cee98691e7a95001130c9ea7823e6a75cc72503facd3a76
case "$XBPS_TARGET_MACHINE" in
x86_64-musl) broken="cannot convert 'off_t*' to 'const fpos_t*'" ;;
esac