From 201c0eec1c5d4f7439bffaeb20d40acd066efb45 Mon Sep 17 00:00:00 2001 From: millert Date: Sun, 29 Oct 2023 14:23:04 +0000 Subject: [PATCH] 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@ --- sbin/ifconfig/ifconfig.c | 4 ++-- 1 file 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); } -- 2.20.1