Skip to content

Commit

Permalink
decode_prometheus: fix 64-bit timestamp parsing for Windows
Browse files Browse the repository at this point in the history
Windows (even 64-bit!) uses an LLP64 data model where long int is still only 32-bits...

Signed-off-by: Stewart Webb <[email protected]>
  • Loading branch information
nuclearpidgeon authored and edsiper committed Aug 5, 2024
1 parent cfc8af5 commit 1f51095
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmt_decode_prometheus.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static int parse_uint64(const char *in, uint64_t *out)
int64_t val;

errno = 0;
val = strtol(in, &end, 10);
val = strtoll(in, &end, 10);
if (end == in || *end != 0 || errno) {
return -1;
}
Expand Down

0 comments on commit 1f51095

Please sign in to comment.