diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/openntpd/Makefile | 1 | ||||
-rw-r--r-- | net/openntpd/files/patch-compat_adjfreq__freebsd.c | 23 | ||||
-rw-r--r-- | net/openntpd/files/patch-src_ntpd.c | 18 |
3 files changed, 42 insertions, 0 deletions
diff --git a/net/openntpd/Makefile b/net/openntpd/Makefile index 45a058572ca6..21b25af11eea 100644 --- a/net/openntpd/Makefile +++ b/net/openntpd/Makefile @@ -2,6 +2,7 @@ PORTNAME= openntpd PORTVERSION= 5.7p4 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_OPENBSD} diff --git a/net/openntpd/files/patch-compat_adjfreq__freebsd.c b/net/openntpd/files/patch-compat_adjfreq__freebsd.c new file mode 100644 index 000000000000..e0e881df87fb --- /dev/null +++ b/net/openntpd/files/patch-compat_adjfreq__freebsd.c @@ -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; ++} diff --git a/net/openntpd/files/patch-src_ntpd.c b/net/openntpd/files/patch-src_ntpd.c new file mode 100644 index 000000000000..eb4601ab9b86 --- /dev/null +++ b/net/openntpd/files/patch-src_ntpd.c @@ -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); + } + |