aboutsummaryrefslogtreecommitdiffstats
path: root/testing/flightgear/musl-fix_fpos_t.patch
diff options
context:
space:
mode:
authorThomas Kienlen <kommander@laposte.net>2021-11-12 22:07:16 +0100
committerLeonardo Arena <rnalrd@alpinelinux.org>2021-11-15 07:16:39 +0000
commit0ab53fe0620f9b8ee0e7ee321be3f9b77ff4c913 (patch)
tree596432a6407e68794c829893ee8229121c218d1f /testing/flightgear/musl-fix_fpos_t.patch
parent1e3e8503307b7d73c50c853dfc45be8e94ff6b50 (diff)
downloadaports-0ab53fe0620f9b8ee0e7ee321be3f9b77ff4c913.tar.gz
aports-0ab53fe0620f9b8ee0e7ee321be3f9b77ff4c913.tar.bz2
aports-0ab53fe0620f9b8ee0e7ee321be3f9b77ff4c913.tar.xz
testing/flightgear: upgrade to 2021.3.11
Diffstat (limited to 'testing/flightgear/musl-fix_fpos_t.patch')
-rw-r--r--testing/flightgear/musl-fix_fpos_t.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/flightgear/musl-fix_fpos_t.patch b/testing/flightgear/musl-fix_fpos_t.patch
new file mode 100644
index 0000000000..c3f709b064
--- /dev/null
+++ b/testing/flightgear/musl-fix_fpos_t.patch
@@ -0,0 +1,17 @@
+For musl libc return the file position using
+ftell(3) because fpos_t is opaque.
+
+--- a/3rdparty/hts_engine_API/lib/HTS_misc.c 2015-02-18 21:10:05.000000000 +0100
++++ b/3rdparty/hts_engine_API/lib/HTS_misc.c 2015-10-31 17:33:53.946349145 +0100
+@@ -247,8 +247,10 @@
+ fgetpos((FILE *) fp->pointer, &pos);
+ #if defined(_WIN32) || defined(__CYGWIN__) || defined(__APPLE__) || defined(__ANDROID__) || defined(__FreeBSD__)
+ return (size_t) pos;
+-#else
++#elif defined(__GLIBC__)
+ return (size_t) pos.__pos;
++#else
++ return (size_t) ftell(fp->pointer);
+ #endif /* _WIN32 || __CYGWIN__ || __APPLE__ || __ANDROID__ */
+ }
+ HTS_error(0, "HTS_ftell: Unknown file type.\n");