From cd10ccf4d1b4671883a0d45f6769947a6cdb45d0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 10:55:47 +0200 Subject: Adding upstream version 1.24.5. Signed-off-by: Daniel Baumann --- lib/gettime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/gettime.c') diff --git a/lib/gettime.c b/lib/gettime.c index f86cc4e..38d3685 100644 --- a/lib/gettime.c +++ b/lib/gettime.c @@ -1,6 +1,6 @@ /* gettime -- get the system clock - Copyright (C) 2002, 2004-2007, 2009-2023 Free Software Foundation, Inc. + Copyright (C) 2002, 2004-2007, 2009-2024 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -35,8 +35,8 @@ gettime (struct timespec *ts) #else struct timeval tv; gettimeofday (&tv, NULL); - ts->tv_sec = tv.tv_sec; - ts->tv_nsec = tv.tv_usec * 1000; + *ts = (struct timespec) { .tv_sec = tv.tv_sec, + .tv_nsec = tv.tv_usec * 1000 }; #endif } -- cgit v1.2.3