From owner-svn-ports-head@FreeBSD.ORG Thu Apr 30 15:17:21 2015 Return-Path: Delivered-To: svn-ports-head@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 C4BB592F; Thu, 30 Apr 2015 15:17:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 9862116D6; Thu, 30 Apr 2015 15:17:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UFHLrw078931; Thu, 30 Apr 2015 15:17:21 GMT (envelope-from naddy@FreeBSD.org) Received: (from naddy@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UFHK4E078928; Thu, 30 Apr 2015 15:17:20 GMT (envelope-from naddy@FreeBSD.org) Message-Id: <201504301517.t3UFHK4E078928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: naddy set sender to naddy@FreeBSD.org using -f From: Christian Weisgerber Date: Thu, 30 Apr 2015 15:17:20 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r385051 - in head/net/openntpd: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 15:17:21 -0000 Author: naddy Date: Thu Apr 30 15:17:20 2015 New Revision: 385051 URL: https://svnweb.freebsd.org/changeset/ports/385051 Log: Clear the timex UNSYNC flag so the RTC receives updates from the system clock. Added: head/net/openntpd/files/patch-compat_adjfreq__freebsd.c (contents, props changed) head/net/openntpd/files/patch-src_ntpd.c (contents, props changed) Modified: head/net/openntpd/Makefile Modified: head/net/openntpd/Makefile ============================================================================== --- head/net/openntpd/Makefile Thu Apr 30 15:12:00 2015 (r385050) +++ head/net/openntpd/Makefile Thu Apr 30 15:17:20 2015 (r385051) @@ -2,6 +2,7 @@ PORTNAME= openntpd PORTVERSION= 5.7p4 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_OPENBSD} Added: head/net/openntpd/files/patch-compat_adjfreq__freebsd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/openntpd/files/patch-compat_adjfreq__freebsd.c Thu Apr 30 15:17:20 2015 (r385051) @@ -0,0 +1,23 @@ +--- compat/adjfreq_freebsd.c.orig 2015-03-12 04:42:13 UTC ++++ compat/adjfreq_freebsd.c +@@ -57,3 +57,20 @@ adjfreq(const int64_t *freq, int64_t *ol + + return 0; + } ++ ++/* ++ * The RTC is only updated if the clock is not marked as unsynced. ++ */ ++ ++void ++update_status(int synced) ++{ ++ struct timex txc = { 0 }; ++ ++ txc.modes = MOD_STATUS; ++ if (!synced) ++ txc.status = STA_UNSYNC; ++ if (ntp_adjtime(&txc) == -1) ++ log_warn("ntp_adjtime (3) failed"); ++ return; ++} Added: head/net/openntpd/files/patch-src_ntpd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/openntpd/files/patch-src_ntpd.c Thu Apr 30 15:17:20 2015 (r385051) @@ -0,0 +1,18 @@ +--- src/ntpd.c.orig 2015-03-25 01:18:56 UTC ++++ src/ntpd.c +@@ -53,6 +53,7 @@ const char *ctl_lookup_option(char * + void show_status_msg(struct imsg *); + void show_peer_msg(struct imsg *, int); + void show_sensor_msg(struct imsg *, int); ++void update_status(int); + + volatile sig_atomic_t quit = 0; + volatile sig_atomic_t reconfig = 0; +@@ -423,6 +424,7 @@ ntpd_adjtime(double d) + else if (!firstadj && olddelta.tv_sec == 0 && olddelta.tv_usec == 0) + synced = 1; + firstadj = 0; ++ update_status(synced); + return (synced); + } +