summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorderaadt@openbsd.org <deraadt@openbsd.org>2021-11-13 21:14:13 +0000
committerDamien Miller <djm@mindrot.org>2021-11-18 09:09:59 +1100
commit6582a31c388968f4073af2bd8621880735c3d42b (patch)
treeda5704116e32132963b6fc5e317784db44725a33 /misc.c
parent7c025c005550c86a40200a2bcdd355d09413d61a (diff)
downloadopenssh-git-6582a31c388968f4073af2bd8621880735c3d42b.tar.gz
upstream: replace select() with ppoll(), including converting
timeval's to timespec's to make things easier. back and forth and ok; djm OpenBSD-Commit-ID: 89d3b23c60875da919e7820f9de6213286ffbec9
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc.c b/misc.c
index 0134d694..f541055c 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.170 2021/09/26 14:01:03 djm Exp $ */
+/* $OpenBSD: misc.c,v 1.171 2021/11/13 21:14:13 deraadt Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005-2020 Damien Miller. All rights reserved.
@@ -1616,12 +1616,12 @@ ms_subtract_diff(struct timeval *start, int *ms)
}
void
-ms_to_timeval(struct timeval *tv, int ms)
+ms_to_timespec(struct timespec *ts, int ms)
{
if (ms < 0)
ms = 0;
- tv->tv_sec = ms / 1000;
- tv->tv_usec = (ms % 1000) * 1000;
+ ts->tv_sec = ms / 1000;
+ ts->tv_nsec = (ms % 1000) * 1000 * 1000;
}
void