summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mooney <pmooney@pfmooney.com>2016-05-23 20:36:31 +0000
committerPatrick Mooney <pmooney@pfmooney.com>2016-05-23 21:02:23 +0000
commit743a27ef611fc92b587762aabf69029d99f421f4 (patch)
tree1fc5d9e2372da4fbf50ea9b654c8259b160861d7
parent042c1410d620ae83434d9daae3758ab5bb481ccd (diff)
downloadillumos-joyent-743a27ef611fc92b587762aabf69029d99f421f4.tar.gz
OS-5429 lxbrand time(2) broken in vdso
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
-rw-r--r--usr/src/lib/brand/lx/lx_vdso/common/vdso_main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr/src/lib/brand/lx/lx_vdso/common/vdso_main.c b/usr/src/lib/brand/lx/lx_vdso/common/vdso_main.c
index a0474bf26e..2fe7adffc8 100644
--- a/usr/src/lib/brand/lx/lx_vdso/common/vdso_main.c
+++ b/usr/src/lib/brand/lx/lx_vdso/common/vdso_main.c
@@ -23,7 +23,7 @@ struct lx_timezone {
extern comm_page_t *__vdso_find_commpage();
extern int __vdso_sys_gettimeofday(timespec_t *, struct lx_timezone *);
-extern time_t __vdso_sys_time(timespec_t *);
+extern time_t __vdso_sys_time(time_t *);
extern long __vdso_sys_clock_gettime(uint_t, timespec_t *);
#define LX_CLOCK_REALTIME 0 /* CLOCK_REALTIME */
@@ -99,7 +99,7 @@ __vdso_gettimeofday(timespec_t *tp, struct lx_timezone *tz)
}
time_t
-__vdso_time(timespec_t *tp)
+__vdso_time(time_t *tp)
{
comm_page_t *cp = __vdso_find_commpage();
timespec_t ts;
@@ -110,8 +110,7 @@ __vdso_time(timespec_t *tp)
__cp_clock_gettime_realtime(cp, &ts);
if (tp != NULL) {
- tp->tv_sec = ts.tv_sec;
- tp->tv_nsec = 0;
+ *tp = ts.tv_sec;
}
return (ts.tv_sec);
}