From 98e84e3c93689b093d1bc21e3d98d9035dfea622 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 20 May 2022 08:12:06 +0100 Subject: [PATCH] dirb: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: resume.o:/build/dirb222/src/variables.h:15: multiple definition of `curl'; crea_wordlist.o:/build/dirb222/src/variables.h:15: first defined here --- pkgs/tools/networking/dirb/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/networking/dirb/default.nix b/pkgs/tools/networking/dirb/default.nix index 09f1fbc2f9f9..e8826ee6454b 100644 --- a/pkgs/tools/networking/dirb/default.nix +++ b/pkgs/tools/networking/dirb/default.nix @@ -25,6 +25,12 @@ in stdenv.mkDerivation rec { sed -i "s#/usr#$out#" src/dirb.c ''; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: resume.o:/build/dirb222/src/variables.h:15: multiple definition of `curl'; + # crea_wordlist.o:/build/dirb222/src/variables.h:15: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + postInstall = '' mkdir -p $out/share/dirb/ cp -r wordlists/ $out/share/dirb/