Browse Source
32-bit android uses 32-bit off_t by default. When building with -D_FILE_OFFSET_BITS=64 with unified headers off_t are promoted to 64-bit, but there are bugs in the toolchain and spotty support for it in the platform (not all functions are available until android-24, and the platform zlib is compiled with 32-bit off_t). Also, unless every library&program is rebuilt with 64-bit off_t, including user-built ones, we risk a mismatch between programs and libraries which can cause serious (but sometimes subtle) runtime failures. As -D_FILE_OFFSET_BITS=64 is not that important for most users (with mariadb requiring it as an exception), we drop the support for now by patching it away in <sys/cdefs.h>.android-5
Fredrik Fornwall
8 years ago
6 changed files with 27 additions and 6 deletions
@ -0,0 +1,17 @@ |
|||||
|
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/cdefs.h ./usr/include/sys/cdefs.h
|
||||
|
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/cdefs.h 2017-06-20 17:41:56.000000000 +0200
|
||||
|
+++ ./usr/include/sys/cdefs.h 2017-07-07 03:27:59.327850834 +0200
|
||||
|
@@ -234,13 +234,6 @@
|
||||
|
# define __USE_BSD 1 |
||||
|
#endif |
||||
|
|
||||
|
-/* _FILE_OFFSET_BITS 64 support. */
|
||||
|
-#if !defined(__LP64__) && defined(_FILE_OFFSET_BITS)
|
||||
|
-#if _FILE_OFFSET_BITS == 64
|
||||
|
-#define __USE_FILE_OFFSET64 1
|
||||
|
-#endif
|
||||
|
-#endif
|
||||
|
-
|
||||
|
#define __BIONIC__ 1 |
||||
|
#include <android/api-level.h> |
||||
|
|
Loading…
Reference in new issue