opusfile
opusfile copied to clipboard
Fix incorrect usage for file-access.
Immediate symptom is that in src/stream.c, declarations for ftello(...)
and fseeko(...)
are not available.
(Errors will be raised if compiled with -Wimplicit-function-declaration
You hit the delete or backspace key a little too much resulting in the following brokenness...
-# include <stdlib.h>
+#endif# include <stdlib.h>
Simplified / cleaned up patch:
diff --git a/src/internal.h b/src/internal.h
index 9ac17e0..62b235f 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -18,6 +18,8 @@
# if !defined(_GNU_SOURCE)
# define _GNU_SOURCE
# endif
+/* 64-bit file access is broken before ANDROID 24. */
+# if !defined(__ANDROID__)||__ANDROID_API__ >= 24
# if !defined(_LARGEFILE_SOURCE)
# define _LARGEFILE_SOURCE
# endif
@@ -27,6 +29,7 @@
# if !defined(_FILE_OFFSET_BITS)
# define _FILE_OFFSET_BITS 64
# endif
+# endif
# include <stdlib.h>
# include <opusfile.h>
@sezero Hi, has your patch been merged into the repo? Should I close this pull request?
@sezero Hi, has your patch been merged into the repo?
No. I just added my comments here to notify you of the issues in your patch, that's all.
Further research suggests it's only API levels 21, 22, and 23 which were broken. Prior to that the defines were just ignored by the NDK.
Actually, this also depends on the ndk version.