From aaf30454802855d439f3d4d1a12fd6b905621029 Mon Sep 17 00:00:00 2001 From: Svante Signell Date: Tue, 30 Aug 2016 23:06:31 +0200 Subject: [PATCH] hurd: Fix adjtime call with OLDDELTA == NULL * sysdeps/mach/hurd/adjtime.c (__adjtime): When OLDDELTA is NULL, make it point to a dumb buffer for RPC to fill it. --- ChangeLog | 5 +++++ sysdeps/mach/hurd/adjtime.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 418bdae9b4..d24536ba9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-08-30 Svante Signell + + * sysdeps/mach/hurd/adjtime.c (__adjtime): When OLDDELTA is NULL, make + it point to a dumb buffer for RPC to fill it. + 2016-08-30 Siddhesh Poyarekar * sysdeps/ieee754/dbl-64/s_sin.c (do_cos_slow): Use ternary diff --git a/sysdeps/mach/hurd/adjtime.c b/sysdeps/mach/hurd/adjtime.c index d65b95b9c6..7cfdd53e82 100644 --- a/sysdeps/mach/hurd/adjtime.c +++ b/sysdeps/mach/hurd/adjtime.c @@ -28,11 +28,15 @@ __adjtime (const struct timeval *delta, struct timeval *olddelta) { error_t err; mach_port_t hostpriv; + struct timeval dummy; err = __get_privileged_ports (&hostpriv, NULL); if (err) return __hurd_fail (EPERM); + if (olddelta == NULL) + olddelta = &dummy; + err = __host_adjust_time (hostpriv, /* `time_value_t' and `struct timeval' are in fact identical with the names changed. */ -- 2.43.5