Skip to content

Instantly share code, notes, and snippets.

@jevinskie
Created October 21, 2025 18:35
Show Gist options
  • Save jevinskie/fe9bc261c130c4536b35c0e74d8ea58f to your computer and use it in GitHub Desktop.
Save jevinskie/fe9bc261c130c4536b35c0e74d8ea58f to your computer and use it in GitHub Desktop.
how to fix annoying xcode 26 or late 16 betas zlib build failure (TARGET_OS_MAC and MACOS macros)
# single file
sd -F '#if defined(MACOS) || defined(TARGET_OS_MAC)' '#if !defined(__APPLE__) && (defined(MACOS) || defined(TARGET_OS_MAC))' zlib/zutil.h
# YOLO, probably works for you
for f in $(fd -HI zutil.h .); sd -F '#if defined(MACOS) || defined(TARGET_OS_MAC)' '#if !defined(__APPLE__) && (defined(MACOS) || defined(TARGET_OS_MAC))' "$f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment