From e78750f8cf6e8b1041069de3c36a305918862193 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Sat, 14 Feb 2026 09:17:33 +0100 Subject: [PATCH] fix(darwin): work around inetutils 2.7 build failure on macOS gnulib's error.h macros cause compilation errors with newer Clang due to __VA_ARGS__ handling and -Wformat-security. Disable format hardening and suppress -Werror to allow inetutils to build on Darwin. Co-Authored-By: Claude Opus 4.6 --- overlays/inetutils-darwin-fix/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 overlays/inetutils-darwin-fix/default.nix diff --git a/overlays/inetutils-darwin-fix/default.nix b/overlays/inetutils-darwin-fix/default.nix new file mode 100644 index 0000000..b86d0af --- /dev/null +++ b/overlays/inetutils-darwin-fix/default.nix @@ -0,0 +1,10 @@ +{ ... }: +final: prev: { + inetutils = prev.inetutils.overrideAttrs (old: { + # Fix gnulib variadic macro error on Darwin with newer Clang + # The error.h macro __gl_error_call1 has issues with __VA_ARGS__ + # and -Werror,-Wformat-security causes build failures + NIX_CFLAGS_COMPILE = (old.NIX_CFLAGS_COMPILE or "") + " -Wno-error"; + hardeningDisable = (old.hardeningDisable or [ ]) ++ [ "format" ]; + }); +}