summaryrefslogtreecommitdiff
path: root/dev-libs/hts_engine/files/hts_engine-1.10-musl.patch
blob: d6a2859f68cadc23e777fb2ef58d112ac74eb060 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
The position variable which fgetpos() sets is entirely unspecified,
so shouldn't be used in portable code.

diff --git a/lib/HTS_misc.c.old b/lib/HTS_misc.c
index 72306cb..45c51cd 100644
--- a/lib/HTS_misc.c.old
+++ b/lib/HTS_misc.c
@@ -243,13 +243,7 @@ size_t HTS_ftell(HTS_File * fp)
    if (fp == NULL) {
       return 0;
    } else if (fp->type == HTS_FILE) {
-      fpos_t pos;
-      fgetpos((FILE *) fp->pointer, &pos);
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(__APPLE__) || defined(__ANDROID__)
-      return (size_t) pos;
-#else
-      return (size_t) pos.__pos;
-#endif                          /* _WIN32 || __CYGWIN__ || __APPLE__ || __ANDROID__ */
+      return (size_t)ftell((FILE *) fp->pointer);
    } else if (fp->type == HTS_DATA) {
       HTS_Data *d = (HTS_Data *) fp->pointer;
       return d->index;