Skip to content

Commit

Permalink
[Shared] Workarounds for zlib and libpng to compile on macOS 13.5.2 (…
Browse files Browse the repository at this point in the history
…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).
  • Loading branch information
Daggolin authored and Razish committed Sep 17, 2023
1 parent 41ff78f commit c1b347d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -114,6 +114,7 @@ else()
set(X86 OFF)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm64|aarch64)$")
set(Architecture "arm64")
add_definitions(-DPNG_ARM_NEON_OPT=0)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
set(Architecture "arm")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
Expand Down
4 changes: 4 additions & 0 deletions lib/zlib/gzguts.h
Expand Up @@ -3,6 +3,10 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/

#if defined(__APPLE__)
# include <unistd.h>
#endif

#ifdef _LARGEFILE64_SOURCE
# ifndef _LARGEFILE_SOURCE
# define _LARGEFILE_SOURCE 1
Expand Down

0 comments on commit c1b347d

Please sign in to comment.