Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/librumpuser TIMEVAL_TO_TIMESPEC (for musl)



details:   https://anonhg.NetBSD.org/src/rev/01a3225d4b58
branches:  trunk
changeset: 788822:01a3225d4b58
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Jul 22 08:58:31 2013 +0000

description:
TIMEVAL_TO_TIMESPEC (for musl)

from Justin Cormack

diffstat:

 lib/librumpuser/rumpuser_port.h |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r b209ef955749 -r 01a3225d4b58 lib/librumpuser/rumpuser_port.h
--- a/lib/librumpuser/rumpuser_port.h   Mon Jul 22 04:55:09 2013 +0000
+++ b/lib/librumpuser/rumpuser_port.h   Mon Jul 22 08:58:31 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpuser_port.h,v 1.19 2013/07/20 18:46:15 pooka Exp $ */
+/*     $NetBSD: rumpuser_port.h,v 1.20 2013/07/22 08:58:31 pooka Exp $ */
 
 /*
  * Portability header for non-NetBSD platforms.
@@ -203,4 +203,14 @@
 typedef RUMP_REGISTER_T register_t;
 #endif
 
+#include <sys/time.h>
+
+#ifndef TIMEVAL_TO_TIMESPEC
+#define TIMEVAL_TO_TIMESPEC(tv, ts)            \
+do {                                           \
+       (ts)->tv_sec  = (tv)->tv_sec;           \
+       (ts)->tv_nsec = (tv)->tv_usec * 1000;   \
+} while (/*CONSTCOND*/0)
+#endif
+
 #endif /* _LIB_LIBRUMPUSER_RUMPUSER_PORT_H_ */



Home | Main Index | Thread Index | Old Index