From: Karel Zak Date: Fri, 16 Oct 2015 09:48:47 +0000 (+0200) Subject: script: be pedantic and use "%"SCNi64 X-Git-Tag: v2.28-rc1~303 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2f03da93d9b79679e4e7e65807cc9a31036dbe7;p=thirdparty%2Futil-linux.git script: be pedantic and use "%"SCNi64 Signed-off-by: Karel Zak --- diff --git a/term-utils/script.c b/term-utils/script.c index 67ed8b9ca3..b6227c08ed 100644 --- a/term-utils/script.c +++ b/term-utils/script.c @@ -62,6 +62,7 @@ #include #include #include +#include #include "closestream.h" #include "nls.h" @@ -143,7 +144,7 @@ static inline time_t script_time(time_t *t) const char *str = getenv("SCRIPT_TEST_SECOND_SINCE_EPOCH"); int64_t sec; - if (!str || sscanf(str, "%jd", &sec) != 1) + if (!str || sscanf(str, "%"SCNi64, &sec) != 1) return time(t); if (t) *t = (time_t)sec;