mrtg: gcc14 broke detection of print format specifiers
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
--- mrtg-2.17.10/configure.bak 2025-10-17 20:44:24.878718603 +0100
|
||||
+++ mrtg-2.17-10/configure 2025-10-17 20:44:40.343747835 +0100
|
||||
@@ -3664,6 +3664,7 @@
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
int main()
|
||||
{
|
||||
long long b, a = -0x3AFAFAFAFAFAFAFALL;
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
makeWrapper,
|
||||
fetchurl,
|
||||
perl,
|
||||
gd,
|
||||
@@ -24,6 +25,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-x/EcteIXpQDYfuO10mxYqGUu28DTKRaIu3krAQ+uQ6w=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildInputs = [
|
||||
# add support for ipv6 snmp:
|
||||
# https://github.com/oetiker/mrtg/blob/433ebfa5fc043971b46a5cd975fb642c76e3e49d/src/bin/mrtg#L331-L341
|
||||
@@ -32,6 +35,20 @@ stdenv.mkDerivation rec {
|
||||
rrdtool
|
||||
];
|
||||
|
||||
patches = [
|
||||
# gcc14 broke detection of printf format specifiers
|
||||
# building from master seems to be fixed upstream, so next release can (likely) drop the patch
|
||||
# just keep the CFLAGS below
|
||||
./configure-long-long-format-gcc14.patch
|
||||
];
|
||||
env.NIX_CFLAGS_COMPILE = "-Werror";
|
||||
env.NIX_CFLAGS_LINK = "-lm";
|
||||
|
||||
postInstall = ''
|
||||
# mrtg wants plain C locale
|
||||
wrapProgram $out/bin/mrtg --set LANG C
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Multi Router Traffic Grapher";
|
||||
homepage = "https://oss.oetiker.ch/mrtg/";
|
||||
|
||||
Reference in New Issue
Block a user