diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 1994-09-29 23:04:24 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 1994-09-29 23:04:24 +0000 |
commit | daa35edbd086b27357d8f048ede7c84dcc520748 (patch) | |
tree | 8dd520f3dfb7df4f73618d886e20c1154f3e5e5f /usr.sbin/xntpd/kernel/tty_clk.c | |
parent | d2d2eed18837c57f97405aa88134457f8d97640d (diff) |
Notes
Diffstat (limited to 'usr.sbin/xntpd/kernel/tty_clk.c')
-rw-r--r-- | usr.sbin/xntpd/kernel/tty_clk.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/usr.sbin/xntpd/kernel/tty_clk.c b/usr.sbin/xntpd/kernel/tty_clk.c index d1b4bbef64b4e..072061039bf30 100644 --- a/usr.sbin/xntpd/kernel/tty_clk.c +++ b/usr.sbin/xntpd/kernel/tty_clk.c @@ -191,6 +191,19 @@ clkinput(c, tp) if (putc(c, &clk->clkbuf) == -1) goto flushout; +#ifdef CLKLDISC + /* + * STREAMS people started writing timestamps this way. + * It's not my fault, I am just going along with the flow... + */ + for (i = 0; i < sizeof(struct timeval); i++) + if (putc(*( ((char*)&tv) + i ), &clk->clkbuf) == -1) + goto flushout; +#else + /* + * This is a machine independant way of puting longs into + * the datastream. It has fallen into disuse... + */ s = tv.tv_sec; for (i = 0; i < sizeof(long); i++) { if (putc((s >> 24) & 0xff, &clk->clkbuf) == -1) @@ -204,6 +217,7 @@ clkinput(c, tp) goto flushout; s <<= 8; } +#endif /* * If the length of the rawq exceeds our sanity limit, dump |