Skip to content

Commit c1b347d

Browse files
DaggolinRazish
authored andcommitted
[Shared] Workarounds for zlib and libpng to compile on macOS 13.5.2 (Apple M1) using Xcode 14.3.1 (14E300c).
The same workarounds were also used to compile on macOS 11.4 (Apple M1) using Xcode 12.5.1 (12E507).
1 parent 41ff78f commit c1b347d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ else()
114114
set(X86 OFF)
115115
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm64|aarch64)$")
116116
set(Architecture "arm64")
117+
add_definitions(-DPNG_ARM_NEON_OPT=0)
117118
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
118119
set(Architecture "arm")
119120
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")

lib/zlib/gzguts.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* For conditions of distribution and use, see copyright notice in zlib.h
44
*/
55

6+
#if defined(__APPLE__)
7+
# include <unistd.h>
8+
#endif
9+
610
#ifdef _LARGEFILE64_SOURCE
711
# ifndef _LARGEFILE_SOURCE
812
# define _LARGEFILE_SOURCE 1

0 commit comments

Comments
 (0)