~ubuntu-branches/ubuntu/trusty/conntrack/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/printf-time-long.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Wirt, Max Kellermann
  • Date: 2008-04-14 23:09:22 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080414230922-9xoi1gl38tc8lyng
Tags: 1:0.9.6-4
[ Max Kellermann ]
fix compilation on SPARC (printf argument mismatch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## DP: Fix compilation warning (error) on SPARC, where timeval
 
3
## DP: attributes don't seem to fit "%ld".  Also format them as unsigned
 
4
## DP: numbers.
 
5
 
 
6
--- conntrack-tools/src/conntrack.c
 
7
+++ conntrack-tools/src/conntrack.c
 
8
@@ -597,7 +597,8 @@
 
9
                if (!(output_mask & _O_XML)) {
 
10
                        struct timeval tv;
 
11
                        gettimeofday(&tv, NULL);
 
12
-                       printf("[%-8ld.%-6ld]\t", tv.tv_sec, tv.tv_usec);
 
13
+                       printf("[%-8lu.%-6lu]\t", (unsigned long)tv.tv_sec,
 
14
+                               (unsigned long)tv.tv_usec);
 
15
                } else
 
16
                        output_flags |= NFCT_OF_TIME;
 
17
        }