Skip to content

Commit c935ced

Browse files
committed
fix(pg_net): disable dangling-assignment warning for v0.19.5 on aarch64-darwin
Version 0.19.5 has a dangling pointer issue in src/core.c:177 that causes compilation to fail on aarch64-darwin with newer clang versions. This adds -Wno-error=dangling-assignment to allow compilation to proceed. The flag is restricted to aarch64-darwin only since GCC on Linux doesn't recognize this warning option.
1 parent 446e441 commit c935ced

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

nix/ext/pg_net.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,14 @@ let
4949
rm sql/pg_net--0.5.1--0.6.sql
5050
'';
5151

52-
env.NIX_CFLAGS_COMPILE = lib.optionalString (lib.versionOlder version "0.19.1") "-Wno-error";
52+
env.NIX_CFLAGS_COMPILE =
53+
if (lib.versionOlder version "0.19.1") then
54+
"-Wno-error"
55+
else if (version == "0.19.5" && stdenv.isDarwin && stdenv.isAarch64) then
56+
# Fix for dangling pointer warning in src/core.c:177 on aarch64-darwin with newer clang
57+
"-Wno-error=dangling-assignment"
58+
else
59+
"";
5360

5461
installPhase = ''
5562
mkdir -p $out/{lib,share/postgresql/extension}

0 commit comments

Comments
 (0)