atomicparsley: fix musl patch + enable pie
nopie=yes is no longer required. The patch for musl libc's fpos_t was wrong, because stdio.h has an opaque definition fpos_t::__opaque and no __pos member. Rrite the file position into the first 64 bits of the union using a *(uint64_t*) type cast.
This commit is contained in:
parent
8c94da947a
commit
1da28202e8
2 changed files with 9 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
--- AtomicParsley.cpp 2017-01-27 18:09:38.871046030 +0100
|
||||
+++ AtomicParsley.cpp 2017-01-27 18:10:35.548088839 +0100
|
||||
@@ -4585,10 +4585,10 @@
|
||||
@@ -4585,10 +4585,11 @@
|
||||
#if defined(_MSC_VER)
|
||||
fpos_t file_offset = dest_position + file_pos;
|
||||
#elif defined(__GLIBC__)
|
||||
|
@ -9,11 +9,12 @@
|
|||
file_offset.__pos = dest_position + file_pos;
|
||||
#else
|
||||
- off_t file_offset = dest_position + file_pos;
|
||||
+ fpos_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, (size_t)max_buffer, 1, dest_file);
|
||||
@@ -4601,10 +4601,10 @@
|
||||
@@ -4601,10 +4601,11 @@
|
||||
#if defined(_MSC_VER)
|
||||
fpos_t file_offset = dest_position + file_pos;
|
||||
#elif defined(__GLIBC__)
|
||||
|
@ -22,7 +23,8 @@
|
|||
file_offset.__pos = dest_position + file_pos;
|
||||
#else
|
||||
- off_t file_offset = dest_position + file_pos;
|
||||
+ fpos_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, (size_t)(src_file_size - file_pos), 1, dest_file);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'atomicparsley'.
|
||||
pkgname=atomicparsley
|
||||
version=0.9.0
|
||||
revision=1
|
||||
revision=2
|
||||
hostmakedepends="unzip"
|
||||
short_desc="Lightweight program for manipulating MPEG-4 metadata"
|
||||
maintainer="svenper <svenper@users.noreply.github.com>"
|
||||
|
@ -10,7 +10,8 @@ homepage="http://atomicparsley.sourceforge.net"
|
|||
distfiles="${SOURCEFORGE_SITE}/${pkgname}/AtomicParsley-source-${version}.zip"
|
||||
checksum=de83f219f95e6fe59099b277e3ced86f0430ad9468e845783092821dff15a72e
|
||||
wrksrc=AtomicParsley-source-${version}
|
||||
nopie=yes
|
||||
|
||||
CXXFLAGS="-Wno-write-strings"
|
||||
|
||||
pre_build() {
|
||||
sed -ri 's/(char\*.*strrchr.*)/const \1/g' AtomicParsley.cpp
|
||||
|
|
Loading…
Reference in a new issue