The branch main has been updated by 0mp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=7b390cb636899582243e4daa8edbdb30d686d9fb

commit 7b390cb636899582243e4daa8edbdb30d686d9fb
Author:     Mateusz Piotrowski <0...@freebsd.org>
AuthorDate: 2024-04-26 15:19:18 +0000
Commit:     Mateusz Piotrowski <0...@freebsd.org>
CommitDate: 2024-04-26 15:32:57 +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
---
 bin/date/date.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/bin/date/date.c b/bin/date/date.c
index ccd72cb98445..718c94601dd6 100644
--- a/bin/date/date.c
+++ b/bin/date/date.c
@@ -96,6 +96,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':

Reply via email to