Module Name: src
Committed By: pooka
Date: Mon Jul 22 08:58:31 UTC 2013
Modified Files:
src/lib/librumpuser: rumpuser_port.h
Log Message:
TIMEVAL_TO_TIMESPEC (for musl)
from Justin Cormack
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/librumpuser/rumpuser_port.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/librumpuser/rumpuser_port.h
diff -u src/lib/librumpuser/rumpuser_port.h:1.19 src/lib/librumpuser/rumpuser_port.h:1.20
--- src/lib/librumpuser/rumpuser_port.h:1.19 Sat Jul 20 18:46:15 2013
+++ src/lib/librumpuser/rumpuser_port.h Mon Jul 22 08:58:31 2013
@@ -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 @@ posix_memalign(void **ptr, size_t align,
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_ */