mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
3rdparty(libtiff): fix build with Android NDK 16
Compiler message: tif_unix.c:170:12: error: call to 'mmap' declared with attribute error: mmap is not available with _FILE_OFFSET_BITS=64 when using GCC until android-21. Either raise your minSdkVersion, disable _FILE_OFFSET_BITS=64, or switch to Clang.
This commit is contained in:
parent
5f9bb6249e
commit
c608c232a2
12
3rdparty/libtiff/CMakeLists.txt
vendored
12
3rdparty/libtiff/CMakeLists.txt
vendored
@ -244,10 +244,14 @@ mark_as_advanced(HAVE_IEEEFP)
|
|||||||
|
|
||||||
# Large file support
|
# Large file support
|
||||||
if(UNIX OR MINGW)
|
if(UNIX OR MINGW)
|
||||||
# This might not catch every possibility catered for by
|
if(ANDROID AND (ANDROID_NATIVE_API_LEVEL LESS 21) AND (NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES Clang))
|
||||||
# AC_SYS_LARGEFILE.
|
# Android NDK build problem: 'mmap' issue with GCC and API<21
|
||||||
add_definitions(-D_FILE_OFFSET_BITS=64)
|
else()
|
||||||
set(FILE_OFFSET_BITS 64)
|
# This might not catch every possibility catered for by
|
||||||
|
# AC_SYS_LARGEFILE.
|
||||||
|
add_definitions(-D_FILE_OFFSET_BITS=64)
|
||||||
|
set(FILE_OFFSET_BITS 64)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Documentation install directory (default to cmake project docdir)
|
# Documentation install directory (default to cmake project docdir)
|
||||||
|
3
3rdparty/libtiff/tif_config.h.cmake.in
vendored
3
3rdparty/libtiff/tif_config.h.cmake.in
vendored
@ -245,9 +245,6 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
|
||||||
#define _FILE_OFFSET_BITS @FILE_OFFSET_BITS@
|
|
||||||
|
|
||||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
|
Loading…
Reference in New Issue
Block a user