diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-08-11 15:29:56 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-08-11 15:29:56 +0000 |
| commit | 187fe3a586c28176bf39615959b19c595cf82f47 (patch) | |
| tree | 0ed1b8a54b2cf0670eb73eddeadca91d5b94d91a /render.c | |
| parent | ci: gitlab: let's see if we can do 32-bit builds (diff) | |
render: fix compilation errors in 32-bit builds
timeval.tv_usec is an 'unsigned long long' on 32-bit
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -136,14 +136,16 @@ presented(void *data, if (use_input) { struct timeval diff; timersub(commit, input, &diff); - chars += snprintf(&msg[chars], sizeof(msg) - chars, - "input - %lu µs -> ", diff.tv_usec); + chars += snprintf( + &msg[chars], sizeof(msg) - chars, + "input - %llu µs -> ", (unsigned long long)diff.tv_usec); } struct timeval diff; timersub(&presented, commit, &diff); - chars += snprintf(&msg[chars], sizeof(msg) - chars, - "commit - %lu µs -> ", diff.tv_usec); + chars += snprintf( + &msg[chars], sizeof(msg) - chars, + "commit - %llu µs -> ", (unsigned long long)diff.tv_usec); if (use_input) { assert(timercmp(&presented, input, >)); @@ -153,8 +155,9 @@ presented(void *data, timersub(&presented, commit, &diff); } - chars += snprintf(&msg[chars], sizeof(msg) - chars, - "presented (total: %lu µs)", diff.tv_usec); + chars += snprintf( + &msg[chars], sizeof(msg) - chars, + "presented (total: %llu µs)", (unsigned long long)diff.tv_usec); unsigned frame_count = 0; if (tll_length(term->window->on_outputs) > 0) { |
