From 447481e8294680f3e9de279567e63c1a94ac4f16 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 22 Apr 2025 16:05:07 +0100 Subject: [PATCH] deps: V8: cherry-pick third_party/zlib@646b7f569718 Original commit message: [zlib][build] Remove fdopen #defines in zutil.h. The latest version of Clang changed what macros it predefines on Apple targets, causing errors about predefined macros in zlib. See: https://github.com/madler/zlib/commit/4bd9a71f3539b5ce47f0c67ab5e01f3196dc8ef9 Bug: 1519899 Change-Id: Ie75ef4078f2c86d89ba6c036ddd13e768a40ccbb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5237020 Reviewed-by: Adenilson Cavalcanti Commit-Queue: Hans Wennborg Cr-Commit-Position: refs/heads/main@{#1253252} NOKEYCHECK=True GitOrigin-RevId: 2f39ac8d0a414dd65c0e1d5aae38c8f97aa06ae9 Refs: https://chromium.googlesource.com/chromium/src/third_party/zlib/+/646b7f569718921d7d4b5b8e22572ff6c76f2596 PR-URL: https://github.com/nodejs/node/pull/58342 Reviewed-By: Marco Ippolito --- common.gypi | 2 +- deps/v8/third_party/zlib/zutil.h | 23 +---------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/common.gypi b/common.gypi index 13d3425a927..fdf5c3bb40c 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.26', + 'v8_embedder_string': '-node.27', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/third_party/zlib/zutil.h b/deps/v8/third_party/zlib/zutil.h index e0466922244..a3f671c94f8 100644 --- a/deps/v8/third_party/zlib/zutil.h +++ b/deps/v8/third_party/zlib/zutil.h @@ -152,17 +152,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # endif #endif -#if defined(MACOS) || defined(TARGET_OS_MAC) +#if defined(MACOS) # define OS_CODE 7 -# ifndef Z_SOLO -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include /* for fdopen */ -# else -# ifndef fdopen -# define fdopen(fd,mode) NULL /* No fdopen() */ -# endif -# endif -# endif #endif #ifdef __acorn @@ -185,18 +176,6 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define OS_CODE 19 #endif -#if defined(_BEOS_) || defined(RISCOS) -# define fdopen(fd,mode) NULL /* No fdopen() */ -#endif - -#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX -# if defined(_WIN32_WCE) -# define fdopen(fd,mode) NULL /* No fdopen() */ -# else -# define fdopen(fd,type) _fdopen(fd,type) -# endif -#endif - #if defined(__BORLANDC__) && !defined(MSDOS) #pragma warn -8004 #pragma warn -8008