Skip to content

Conversation

@markmentovai
Copy link
Contributor

This adapts madler/zlib@4bd9a71 (2024-01-14), which appeared in zlib 1.3.1 (2024-01-22), to the snapshot of zlib in zipfile-deflate64 0.2.0 (2022-01-05). This zlib snapshot is based on zlib 1.2.11 (2017-01-15).

This patch is necessary for compatibility with the Clang compiler in Xcode ≥ 16.3: TARGET_OS_MAC as it was used in zutil.h intends to refer to the Classic Mac OS. This macro has long been defined by the macOS SDK to mean modern macOS, but was only defined by <TargetConditionals.h>, which was not ordinarily llvm/llvm-project@6e1f191 (2023-12-07, in upstream Clang 18.1, 2024-01-29, and in Xcode 16.3, 2025-03-31) now has the compiler itself defining this macro unconditionally for Apple targets (https://releases.llvm.org/18.1.0/tools/clang/docs/ReleaseNotes.html#clang-frontend-potentially-breaking-changes), with the effect of breaking code like this that used the macro in a different way. There was some discussion of this at madler/zlib#895.

The upstream project, https://github.com/brianhelba/zipfile-deflate64/, appears dead, with no updates since 2022-01-05, and no action on pull requests since then either. brianhelba/zipfile-deflate64#45 was reported against the upstream on 2025-04-24 for this exact problem. But @brianhelba anyway in case it helps.

Description

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 26.0 25A354 arm64
Xcode 26.0 17A324

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL in commit message?
  • checked your Portfile with port lint?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?
  • checked that the Portfile's most important variants haven't been broken?

This adapts
madler/zlib@4bd9a71
(2024-01-14), which appeared in zlib 1.3.1 (2024-01-22), to the snapshot of zlib
in zipfile-deflate64 0.2.0 (2022-01-05). This zlib snapshot is based on zlib
1.2.11 (2017-01-15).

This patch is necessary for compatibility with the Clang compiler in Xcode ≥
16.3: TARGET_OS_MAC as it was used in zutil.h intends to refer to the Classic
Mac OS. This macro has long been defined by the macOS SDK to mean modern macOS,
but was only defined by <TargetConditionals.h>, which was not ordinarily
llvm/llvm-project@6e1f191
(2023-12-07, in upstream Clang 18.1, 2024-01-29, and in Xcode 16.3, 2025-03-31)
now has the compiler itself defining this macro unconditionally for Apple
targets
(https://releases.llvm.org/18.1.0/tools/clang/docs/ReleaseNotes.html#clang-frontend-potentially-breaking-changes),
with the effect of breaking code like this that used the macro in a different
way. There was some discussion of this at
madler/zlib#895.
@reneeotten reneeotten merged commit 1d08899 into macports:master Sep 21, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants