summaryrefslogtreecommitdiff
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2023-10-29 14:23:05 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2023-10-29 14:23:05 +0000
commit4446c6dd5a7361343ed8a1b055e838df53bb30a9 (patch)
treeb58f36c94034fbc593d8a3f75a9024e07d9c0733 /sbin/ifconfig
parent124797b2d3eea8bcc31cb6d19d6f6f2ab51eb2ae (diff)
Use clock_gettime(), not timespec_get() like other parts of ifconfig.
This makes is possible to build the base system with a C99 compiler. OK deraadt@ mvs@
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifconfig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index ecc5edd8830..1b0ba073dd6 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.467 2023/06/09 12:22:01 kn Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.468 2023/10/29 14:23:04 millert Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -5955,7 +5955,7 @@ wg_status(int ifaliases)
wg_peer->p_txbytes, wg_peer->p_rxbytes);
if (wg_peer->p_last_handshake.tv_sec != 0) {
- timespec_get(&now, TIME_UTC);
+ clock_gettime(CLOCK_REALTIME, &now);
printf("\t\tlast handshake: %lld seconds ago\n",
now.tv_sec - wg_peer->p_last_handshake.tv_sec);
}