From owner-freebsd-bugs@FreeBSD.ORG Sat May 9 20:08:47 2015 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A734EF96 for ; Sat, 9 May 2015 20:08:47 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77EEC1D64 for ; Sat, 9 May 2015 20:08:47 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t49K8ln0069261 for ; Sat, 9 May 2015 20:08:47 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 200083] [PATCH] ntpdate sets the wrong date on big-endian systems Date: Sat, 09 May 2015 20:08:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: khirbat@gmail.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2015 20:08:47 -0000 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.