From e318a1d5a707ec5c16456106b0822e4a5bfac5bb Mon Sep 17 00:00:00 2001 From: Themaister Date: Wed, 7 Mar 2012 12:42:22 +0100 Subject: [PATCH] Fix incompatibility with non-compilant C runtime. --- conf/config_file.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf/config_file.c b/conf/config_file.c index d16e85b079..b2bed953bb 100644 --- a/conf/config_file.c +++ b/conf/config_file.c @@ -658,7 +658,11 @@ void config_set_int(config_file_t *conf, const char *key, int val) void config_set_uint64(config_file_t *conf, const char *key, uint64_t val) { char buf[128]; +#ifdef _WIN32 + snprintf(buf, sizeof(buf), "%I64u", val); +#else snprintf(buf, sizeof(buf), "%llu", (long long unsigned)val); +#endif config_set_string(conf, key, buf); }