Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 43 lines 1.4 kB view raw
1From f56b314408d22252bf62d6cd2e098cf8139bd048 Mon Sep 17 00:00:00 2001 2From: Sander <hey@sandydoo.me> 3Date: Fri, 13 Jun 2025 01:12:59 +0200 4Subject: [PATCH] build: fix duplicate OS_CODE definitions on macOS 5 6`TARGET_OS_MAC` and `__APPLE__` are both true on macOS, which results in 7duplicate definitions for `OS_CODE`. 8 9Upstream removed the check for `TARGET_OS_MAC`, as well as the ancient 10compat code, in 11https://github.com/madler/zlib/commit/4bd9a71f3539b5ce47f0c67ab5e01f3196dc8ef9. 12 13This was fixed in varnish >= 7.6 as part of https://github.com/varnishcache/varnish-cache/commit/86df12b6c1ad8208899ea353fdcbea227356fcf8. 14--- 15 lib/libvgz/zutil.h | 11 +---------- 16 1 file changed, 1 insertion(+), 10 deletions(-) 17 18diff --git a/lib/libvgz/zutil.h b/lib/libvgz/zutil.h 19index 1c80e3842..294ea2b2d 100644 20--- a/lib/libvgz/zutil.h 21+++ b/lib/libvgz/zutil.h 22@@ -137,17 +137,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ 23 # endif 24 #endif 25 26-#if defined(MACOS) || defined(TARGET_OS_MAC) 27+#if defined(MACOS) 28 # define OS_CODE 7 29-# ifndef Z_SOLO 30-# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os 31-# include <unix.h> /* for fdopen */ 32-# else 33-# ifndef fdopen 34-# define fdopen(fd,mode) NULL /* No fdopen() */ 35-# endif 36-# endif 37-# endif 38 #endif 39 40 #ifdef __acorn 41-- 422.49.0 43