]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mkfs.minix: handle 64bit time on 32bit system
authorThomas Weißschuh <thomas@t-8ch.de>
Fri, 19 May 2023 14:47:22 +0000 (16:47 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Fri, 19 May 2023 15:48:16 +0000 (17:48 +0200)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
disk-utils/mkfs.minix.c

index 1710616bdf08b586fdbf8f65ce93aa54d69961f9..4a8308ade4ed07998b6958a934a65076fa195bfc 100644 (file)
@@ -157,9 +157,9 @@ static void __attribute__((__noreturn__)) usage(void)
 static inline time_t mkfs_minix_time(time_t *t)
 {
        const char *str = getenv("MKFS_MINIX_TEST_SECOND_SINCE_EPOCH");
-       time_t sec;
+       uint64_t sec;
 
-       if (str && sscanf(str, "%ld", &sec) == 1)
+       if (str && sscanf(str, "%"SCNd64, &sec) == 1)
                return sec;
        return time(t);
 }