From 013107a602e720c751e146f7807dc58265e7387d Mon Sep 17 00:00:00 2001 From: Andrey Filipenkov Date: Sun, 29 Jan 2023 15:23:58 +0300 Subject: [PATCH] minizip: fix building for Android API level < 24 --- recipes/minizip/all/conanfile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/minizip/all/conanfile.py b/recipes/minizip/all/conanfile.py index f775fd9f5b915..2f0791217e9ca 100644 --- a/recipes/minizip/all/conanfile.py +++ b/recipes/minizip/all/conanfile.py @@ -68,6 +68,11 @@ def generate(self): tc.variables["MINIZIP_SRC_DIR"] = os.path.join(self.source_folder, "contrib", "minizip").replace("\\", "/") tc.variables["MINIZIP_ENABLE_BZIP2"] = self.options.bzip2 tc.variables["MINIZIP_BUILD_TOOLS"] = self.options.tools + + # fopen64 and similar are unavailable before API level 24: https://github.com/madler/zlib/pull/436 + if self.settings.os == "Android" and int(str(self.settings.os.api_level)) < 24: + tc.preprocessor_definitions["IOAPI_NO_64"] = "1" + tc.generate() deps = CMakeDeps(self) deps.generate()