[Patch] i386 build fix

13 views
Skip to first unread message

Thomas Dreibholz

unread,
Feb 23, 2016, 7:46:47 AM2/23/16
to paris-tr...@googlegroups.com
Hi,

ping.c does not build on the i386 architecture, due to a fprintf call that provides an unsigned int to "%lu" (unsigned long). The attached patch adds the necessary casts to fix it.

--
Best regards / Mit freundlichen Grüßen / Med vennlig hilsen

=======================================================================
Thomas Dreibholz

Simula Research Laboratory
Simula Innovation AS, Network Systems Group
Visiting address: Martin Linges vei 17, 1364 Fornebu, Norway
Mailing address: P.O.Box 134, 1325 Lysaker, Norway
-----------------------------------------------------------------------
E-Mail: dre...@simula.no
Homepage: http://simula.no/people/dreibh
=======================================================================
libparistraceroute-ping-fprintf-fix.patch
signature.asc

Marc-Olivier Buob

unread,
Apr 7, 2016, 6:45:52 PM4/7/16
to paris-tr...@googlegroups.com
Hello,

To be consistent with the rest of the code I made the following change :

diff --git a/libparistraceroute/ping/ping.c b/libparistraceroute/ping/ping.c
index 023c7d9..08f2bfc 100755
--- a/libparistraceroute/ping/ping.c
+++ b/libparistraceroute/ping/ping.c
@@ -451,7 +451,7 @@ int main(int argc, char ** argv)
               desired_size = (size_t) packet_size[0],
               minimal_size;
        if (!check_packet_size(is_icmp, headers_size, desired_size, &minimal_size)) {
-            fprintf(stderr, "Packet size (%lu) too small (try a value >= %lu)\n", desired_size, minimal_size);
+            fprintf(stderr, "Packet size (%zu) too small (try a value >= %zu)\n", desired_size, minimal_size);
            goto ERR_INVALID_PACKET_SIZE;
        }
        probe_payload_resize(probe, desired_size - headers_size);

Does it fix your issue ?

Best regards,
Marc-Olivier



--
You received this message because you are subscribed to the Google Groups "Paris Traceroute" group.
To unsubscribe from this group and stop receiving emails from it, send an email to paris-tracerou...@googlegroups.com.
To post to this group, send email to paris-tr...@googlegroups.com.
Visit this group at https://groups.google.com/group/paris-traceroute.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages