Date: Sat, 09 May 2015 20:08:47 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 200083] [PATCH] ntpdate sets the wrong date on big-endian systems Message-ID: <bug-200083-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200083 Bug ID: 200083 Summary: [PATCH] ntpdate sets the wrong date on big-endian systems Product: Base System Version: 11.0-CURRENT Hardware: mips OS: Any Status: New Keywords: patch Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: khirbat@gmail.com Keywords: patch Created attachment 156581 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=156581&action=edit usr.sbin/ntp/config.h patch to define WORDS_BIGENDIAN This was originally reported on the freebsd-mips mailing list, but this is a general problem on any big-endian system https://lists.freebsd.org/pipermail/freebsd-mips/2015-April/003823.html The attached patch ensures that usr.sbin/ntp/config.h defines WORDS_BIGENDIAN on the platforms that require it. Steps to reproduce - observe current time root@:~ # date Sat May 9 18:16:34 UTC 2015 - turn the clock back a few seconds root@:~ # date 1816 Sat May 9 18:16:00 UTC 2015 May 9 18:16:00 date: date set by root - invoke ntpdate root@:~ # ntpdate -v time.apple.com 9 May 18:16:08 ntpdate[871]: ntpdate 4.2.8p2-a (1) 1 Jan 00:00:00 ntpdate[871]: step time server 17.253.22.243 offset 49.928947 sec - observe the time again (the time is wrong) root@:~ # date Thu Jan 1 00:00:02 UTC 1970 System information root@:~ # uname -a FreeBSD 11.0-CURRENT FreeBSD 11.0-CURRENT #6 904b0d8(master): Sat May 9 07:17:15 UTC 2015 anmol@fbsd:/usr/home/anmol/obj/mips.mips/usr/home/anmol/freebsd/sys/MALTA mips -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-200083-8>