[Bug 200083] [PATCH] ntpdate sets the wrong date on big-endian systems

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat May 9 20:08:47 UTC 2015


            Bug ID: 200083
           Summary: [PATCH] ntpdate sets the wrong date on big-endian
           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 at FreeBSD.org
          Reporter: khirbat at 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

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 offset 49.928947

- 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 at 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.

More information about the freebsd-bugs mailing list