]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: follow timespec and use long int for nsec
authorKarel Zak <kzak@redhat.com>
Thu, 6 May 2021 09:56:14 +0000 (11:56 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 6 May 2021 09:56:14 +0000 (11:56 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/hwclock-parse-date.y

index 954bfdc0272b2455199cffb55e5a1d0d37fdd43b..f1740a2aeb3dd71cb7b26a52d33b168f97146757 100644 (file)
@@ -160,7 +160,7 @@ typedef struct {
        intmax_t hour;
        intmax_t minutes;
        time_t seconds;
-       int ns;
+       long ns;
 } relative_time;
 
 #if HAVE_COMPOUND_LITERALS
@@ -270,7 +270,7 @@ static void apply_relative_time(parser_control *pc, relative_time rel,
 /* Set PC-> hour, minutes, seconds and nanoseconds members from arguments. */
 static void
 set_hhmmss(parser_control *pc, intmax_t hour, intmax_t minutes,
-          time_t sec, int nsec)
+          time_t sec, long nsec)
 {
        pc->hour = hour;
        pc->minutes = minutes;
@@ -1076,7 +1076,7 @@ static int yylex (union YYSTYPE *lvalp, parser_control *pc)
                        }
                        if ((c == '.' || c == ',') && c_isdigit (p[1])) {
                                time_t s;
-                               int ns;
+                               long ns;
                                int digits;
                                uintmax_t value1;