summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_time.c
diff options
context:
space:
mode:
authorpirofti <pirofti@openbsd.org>2011-07-05 18:56:40 +0000
committerpirofti <pirofti@openbsd.org>2011-07-05 18:56:40 +0000
commit001fa934718093d6ca07bef3db03f5b3cb8b2659 (patch)
tree61d8cf78bbb0c926665f4bb8154e64a24ca7df94 /sys/compat/linux/linux_time.c
parentsort (diff)
downloadwireguard-openbsd-001fa934718093d6ca07bef3db03f5b3cb8b2659.tar.xz
wireguard-openbsd-001fa934718093d6ca07bef3db03f5b3cb8b2659.zip
Add linux_to_native_timespec() for future futex use. Okay tedu@.
Diffstat (limited to 'sys/compat/linux/linux_time.c')
-rw-r--r--sys/compat/linux/linux_time.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_time.c b/sys/compat/linux/linux_time.c
index f9e4871b78f..bbc52c05624 100644
--- a/sys/compat/linux/linux_time.c
+++ b/sys/compat/linux/linux_time.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_time.c,v 1.2 2011/04/05 22:15:50 pirofti Exp $ */
+/* $OpenBSD: linux_time.c,v 1.3 2011/07/05 18:56:40 pirofti Exp $ */
/*
* Copyright (c) 2010, 2011 Paul Irofti <pirofti@openbsd.org>
*
@@ -53,6 +53,13 @@ native_to_linux_timespec(struct l_timespec *ltp, struct timespec *ntp)
ltp->tv_nsec = ntp->tv_nsec;
}
+void
+linux_to_native_timespec(struct timespec *ntp, struct l_timespec *ltp)
+{
+ ntp->tv_sec = ltp->tv_sec;
+ ntp->tv_nsec = ltp->tv_nsec;
+}
+
int
linux_to_native_clockid(clockid_t *n, clockid_t l)
{