From 1f5109561e4ed54b91931506ad35fb08d79ae6c0 Mon Sep 17 00:00:00 2001 From: Stewart Webb Date: Wed, 17 Jul 2024 22:41:00 +1000 Subject: [PATCH] decode_prometheus: fix 64-bit timestamp parsing for Windows Windows (even 64-bit!) uses an LLP64 data model where long int is still only 32-bits... Signed-off-by: Stewart Webb --- src/cmt_decode_prometheus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmt_decode_prometheus.c b/src/cmt_decode_prometheus.c index e33a9ef..3a87c34 100644 --- a/src/cmt_decode_prometheus.c +++ b/src/cmt_decode_prometheus.c @@ -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; }