From 4456684b202b2125437c188fa35fe0cee1ff6049 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 9 Apr 2008 06:54:28 +0000 Subject: fix compilation on SPARC (printf argument mismatch) --- debian/patches/00list | 1 + debian/patches/printf-time-long.dpatch | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 debian/patches/printf-time-long.dpatch (limited to 'debian/patches') diff --git a/debian/patches/00list b/debian/patches/00list index 6fc810f..56317ab 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -1,2 +1,3 @@ large-integer-gcc43.dpatch unused-input-gcc43.dpatch +printf-time-long.dpatch diff --git a/debian/patches/printf-time-long.dpatch b/debian/patches/printf-time-long.dpatch new file mode 100644 index 0000000..3beea9d --- /dev/null +++ b/debian/patches/printf-time-long.dpatch @@ -0,0 +1,17 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## DP: Fix compilation warning (error) on SPARC, where timeval +## DP: attributes don't seem to fit "%ld". Also format them as unsigned +## DP: numbers. + +--- conntrack-tools/src/conntrack.c ++++ conntrack-tools/src/conntrack.c +@@ -597,7 +597,8 @@ + if (!(output_mask & _O_XML)) { + struct timeval tv; + gettimeofday(&tv, NULL); +- printf("[%-8ld.%-6ld]\t", tv.tv_sec, tv.tv_usec); ++ printf("[%-8lu.%-6lu]\t", (unsigned long)tv.tv_sec, ++ (unsigned long)tv.tv_usec); + } else + output_flags |= NFCT_OF_TIME; + } -- cgit v1.2.3