git: 4fd988e652e5 - stable/14 - date: Fix tests by initializing timespec structure
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 02 May 2024 20:53:09 UTC
The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=4fd988e652e5045f73df0794bfba870c04d39830 commit 4fd988e652e5045f73df0794bfba870c04d39830 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2024-04-26 15:19:18 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-05-02 20:52:37 +0000 date: Fix tests by initializing timespec structure The tests related to nanosecond support were failing on amd64 due to uninitialized timespec structure. Fixes: eeb04a736cb9 date: Add support for nanoseconds Reviewed by: markj Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D44975 (cherry picked from commit 7b390cb636899582243e4daa8edbdb30d686d9fb) --- bin/date/date.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/date/date.c b/bin/date/date.c index c153ec215b61..62703c6d70ac 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -109,6 +109,8 @@ main(int argc, char *argv[]) (void) setlocale(LC_TIME, ""); rflag = 0; Iflag = jflag = Rflag = 0; + ts.tv_sec = 0; + ts.tv_nsec = 0; while ((ch = getopt(argc, argv, "f:I::jnRr:uv:z:")) != -1) switch((char)ch) { case 'f':