diff --git a/pkgs/applications/audio/mpg321/default.nix b/pkgs/applications/audio/mpg321/default.nix index 593b837704a3..08cfbada9313 100644 --- a/pkgs/applications/audio/mpg321/default.nix +++ b/pkgs/applications/audio/mpg321/default.nix @@ -28,6 +28,12 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: volume.o:/build/mpg321-0.3.2-orig/mpg321.h:119: multiple definition of + # `loop_remaining'; mpg321.o:/build/mpg321-0.3.2-orig/mpg321.h:119: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + configureFlags = [ ("--enable-alsa=" + (if stdenv.isLinux then "yes" else "no")) ] ++ (lib.optional (defaultAudio != null)