printing u_int64_t caused segfault on 32-bit platforms
[strongswan.git] / src / charon / plugins / stroke / stroke_list.c
index 795e1ed..7aa80dc 100644 (file)
@@ -207,14 +207,14 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
                        }
 
                        child_sa->get_usestats(child_sa, TRUE, &use_in, &bytes_in);
-                       fprintf(out, ", %lu bytes_i", bytes_in);
+                       fprintf(out, ", %u bytes_i", (u_int)bytes_in);
                        if (use_in)
                        {
                                fprintf(out, " (%ds ago)", now - use_in);
                        }
 
                        child_sa->get_usestats(child_sa, FALSE, &use_out, &bytes_out);
-                       fprintf(out, ", %lu bytes_o", bytes_out);
+                       fprintf(out, ", %u bytes_o", (u_int)bytes_out);
                        if (use_out)
                        {
                                fprintf(out, " (%ds ago)", now - use_out);