diff --git a/src/task.c b/src/task.c
index d5e0a7d8dc65679cc7e281faa113faf5868a1ff5..ab4184e002294d5aee39f138936f710236c771a1 100644
--- a/src/task.c
+++ b/src/task.c
@@ -794,7 +794,8 @@ void task_dump_all(struct engine *e, int step) {
   /* Add some information to help with the plots and conversion of ticks to
    * seconds. */
   fprintf(file_thread, " %d %d %d %d %lld %lld %lld %lld %lld %d %lld\n", -2,
-          -1, -1, 1, e->tic_step, e->toc_step, e->updates, e->g_updates,
+          -1, -1, 1, (unsigned long long)e->tic_step,
+          (unsigned long long)e->toc_step, e->updates, e->g_updates,
           e->s_updates, 0, cpufreq);
   for (int l = 0; l < e->sched.nr_tasks; l++) {
     if (!e->sched.tasks[l].implicit && e->sched.tasks[l].toc != 0) {