From: Fredrik Fornwall Date: Tue, 8 Aug 2017 08:24:56 +0000 (+0200) Subject: boost: Fix building with NDK r15c X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/termux-packages/commitdiff_plain/e7f446519ceb17afdce50ed12182a8cbcc789cd5 boost: Fix building with NDK r15c --- diff --git a/packages/boost/libs-filesystem-src-operations.cpp.patch b/packages/boost/libs-filesystem-src-operations.cpp.patch new file mode 100644 index 00000000..ba83f5f2 --- /dev/null +++ b/packages/boost/libs-filesystem-src-operations.cpp.patch @@ -0,0 +1,22 @@ +Do not define __USE_FILE_OFFSET64 as it causes fsetpos&fgetpos to be +undefined on api levels lower than android-24. + +diff -u -r ../boost_1_64_0/libs/filesystem/src/operations.cpp ./libs/filesystem/src/operations.cpp +--- ../boost_1_64_0/libs/filesystem/src/operations.cpp 2017-04-17 04:22:19.000000000 +0200 ++++ ./libs/filesystem/src/operations.cpp 2017-08-08 10:08:13.607302273 +0200 +@@ -15,6 +15,7 @@ + #define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect, + #endif + #if !defined(__PGI) ++#if !defined(__ANDROID__) + #define __USE_FILE_OFFSET64 // but that is harmless on Windows and on POSIX + // 64-bit systems or on 32-bit systems which don't have files larger + // than can be represented by a traditional POSIX/UNIX off_t type. +@@ -25,6 +26,7 @@ + // ensure that they are available to all included headers. + // That is required at least on Solaris, and possibly on other + // systems as well. ++#endif + #else + #define _FILE_OFFSET_BITS 64 + #endif