Skip to content

Commit 7360bc3

Browse files
committed
Use correct specifier for printing uint64_t type.
This fixes dmsc#47, thanks to @tsupplis for the original patch.
1 parent 2c0be5d commit 7360bc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/timer.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <math.h>
77
#include <sys/time.h>
88
#include <time.h>
9+
#include <inttypes.h>
910

1011
// Emulate BIOS time
1112
static uint32_t bios_timer = 0;
@@ -66,7 +67,7 @@ static long get_timer_clock(void)
6667
static uint16_t get_actual_timer(struct i8253_timer *t)
6768
{
6869
uint64_t elapsed = get_timer_clock() - t->load_time;
69-
debug(debug_int, "timer elapsed: %ld\n", elapsed);
70+
debug(debug_int, "timer elapsed: %" PRIu64 "\n", elapsed);
7071
switch(t->op_mode & 7)
7172
{
7273
case 2: // RATE GENERATOR

0 commit comments

Comments
 (0)