aboutsummaryrefslogtreecommitdiff
path: root/libntp/buftvtots.c
diff options
context:
space:
mode:
authorOllivier Robert <roberto@FreeBSD.org>2013-12-04 21:33:17 +0000
committerOllivier Robert <roberto@FreeBSD.org>2013-12-04 21:33:17 +0000
commit2b45e011ca352ce509bc83ae148230aeee0c7e0d (patch)
treea618007bb41d13153794a598e3d904ace2976324 /libntp/buftvtots.c
parent9b5bd0a264b0a21eefac2b929b574c73bd601507 (diff)
downloadsrc-5592cd9e3002995d676cc186b0362f891fead9fc.tar.gz
src-5592cd9e3002995d676cc186b0362f891fead9fc.zip
Virgin import of ntpd 4.2.6p5.vendor/ntp/4.2.6p5
When the series of commits is complete, things like https://cert.litnet.lt/en/docs/ntp-distributed-reflection-dos-attacks should be fixed. PR: bin/148836 (except that we import a newer version) Asked by: Too many MFC after: 2 weeks
Diffstat (limited to 'libntp/buftvtots.c')
-rw-r--r--libntp/buftvtots.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libntp/buftvtots.c b/libntp/buftvtots.c
index bfceb35da219..d6d9300f1241 100644
--- a/libntp/buftvtots.c
+++ b/libntp/buftvtots.c
@@ -11,6 +11,7 @@
#include "ntp_string.h"
#include "ntp_unixtime.h"
+#ifndef SYS_WINNT
int
buftvtots(
const char *bufp,
@@ -33,3 +34,20 @@ buftvtots(
TVUTOTSF(tv.tv_usec, ts->l_uf);
return 1;
}
+#else /* SYS_WINNT */
+/*
+ * Windows doesn't have the tty_clock line discipline, so
+ * don't look for a timestamp where there is none.
+ */
+int
+buftvtots(
+ const char *bufp,
+ l_fp *ts
+ )
+{
+ UNUSED_ARG(bufp);
+ UNUSED_ARG(ts);
+
+ return 0;
+}
+#endif /* SYS_WINNT */