shithub: dav1d

Download patch

ref: e8e92d358d57add6ec20b5921df99e5a7bac0210
parent: fe52bffeebb76b24e948f79de9fcd99cd7071ee5
author: Janne Grunau <[email protected]>
date: Sat Mar 21 07:07:53 EDT 2020

android/arm: do not use fseeko in library code

Availability is sketchy if _FILE_OFFSET_BITS is defined to 64 which
meson does by default.
See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md#32_bit-and

--- a/src/arm/cpu.c
+++ b/src/arm/cpu.c
@@ -66,7 +66,10 @@
         // if line is incomplete seek back to avoid splitting the search
         // string into two buffers
         if (!strchr(line, '\n') && strlen(line) > strlen(flag)) {
-            if (fseeko(file, -strlen(flag), SEEK_CUR))
+            // use fseek since the 64 bit fseeko is only available since
+            // Android API level 24 and meson defines _FILE_OFFSET_BITS
+            // by default 64
+            if (fseek(file, -strlen(flag), SEEK_CUR))
                 break;
         }
     }