diff options
author | Svante Signell <svante.signell@gmail.com> | 2016-08-30 23:06:31 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-08-30 23:07:30 +0200 |
commit | aaf30454802855d439f3d4d1a12fd6b905621029 (patch) | |
tree | e31238fcff98ada3bdbc790b0c03970fbda64149 /sysdeps | |
parent | 9d84d0e51d0a590024a050b64e04df3214a04a01 (diff) | |
download | glibc-aaf30454802855d439f3d4d1a12fd6b905621029.zip glibc-aaf30454802855d439f3d4d1a12fd6b905621029.tar.gz glibc-aaf30454802855d439f3d4d1a12fd6b905621029.tar.bz2 |
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.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/mach/hurd/adjtime.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/adjtime.c b/sysdeps/mach/hurd/adjtime.c index d65b95b..7cfdd53 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. */ |