From d6aa02889c1ffd93734d7225c56ee2bbcd3a476a Mon Sep 17 00:00:00 2001 From: Yaksh Bariya Date: Sat, 7 Jun 2025 21:15:06 +0530 Subject: [PATCH] deps: use proper C standard when building libuv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream libuv commits: https://github.com/libuv/libuv/commit/bb706f5fe71827f667f0bce532e95ce0698a498d https://github.com/libuv/libuv/commit/018363a163e8901ac2b90100ee436d9472847ffa libuv was updated to 1.51.0 in 0315283cbdb7745c7e35bb49ac48b0ebcadcb228. v1.51.0 was the release updating from c90 to c11. The standard was back then also updated from c89 to c90. and C89 was never an official standard to begin with. So, I wonder how this managed to stay without breaking anyone's builds for this long. This atleast breaks the builds for Android using NDK r28b and r28a, as LLONG_MAX is not defined by the Clang compiler for older C standards. Fixes: ../../deps/uv/src/unix/linux.c:2331:36: error: use of undeclared identifier 'LLONG_MAX' 2331 | constraint->quota_per_period = LLONG_MAX; | ^ 1 error generated. PR-URL: https://github.com/nodejs/node/pull/58587 Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Juan José Arboleda --- deps/uv/uv.gyp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/uv/uv.gyp b/deps/uv/uv.gyp index 8c8d7d00fd2..3915ac5c6d8 100644 --- a/deps/uv/uv.gyp +++ b/deps/uv/uv.gyp @@ -190,7 +190,7 @@ '-Wno-unused-parameter', '-Wstrict-prototypes', ], - 'OTHER_CFLAGS': [ '-g', '--std=gnu89' ], + 'OTHER_CFLAGS': [ '-g', '--std=gnu11' ], }, 'conditions': [ [ 'OS=="win"', { @@ -262,7 +262,7 @@ 'cflags': [ '-fvisibility=hidden', '-g', - '--std=gnu89', + '--std=gnu11', '-Wall', '-Wextra', '-Wno-unused-parameter',