Browse Source

fixed android zlib compile error.

Marco Di Benedetto 7 years ago
parent
commit
59ea3b6c85
2 changed files with 7 additions and 6 deletions
  1. 4 4
      CMakeLists.txt
  2. 3 2
      contrib/zlib/zlib.h

+ 4 - 4
CMakeLists.txt

@@ -230,10 +230,10 @@ ELSEIF( CMAKE_COMPILER_IS_MINGW )
   ADD_DEFINITIONS( -U__STRICT_ANSI__ )
   ADD_DEFINITIONS( -U__STRICT_ANSI__ )
 ENDIF()
 ENDIF()
 
 
-if(IOS)
-    	set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -fembed-bitcode -O3")
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode -O3")
-endif(IOS)
+if (IOS)
+    set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -fembed-bitcode -O3")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode -O3")
+endif()
 
 
 if (ASSIMP_COVERALLS)
 if (ASSIMP_COVERALLS)
     MESSAGE(STATUS "Coveralls enabled")
     MESSAGE(STATUS "Coveralls enabled")

+ 3 - 2
contrib/zlib/zlib.h

@@ -77,8 +77,9 @@ extern "C" {
   the consistency of the compressed data, so the library should never crash
   the consistency of the compressed data, so the library should never crash
   even in the case of corrupted input.
   even in the case of corrupted input.
 */
 */
-#ifdef __ANDROID__     
-using zcrc_t = unsigned_long; 
+
+#ifdef __ANDROID__
+typedef unsigned long zcrc_t;
 #endif
 #endif
 
 
 typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
 typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));