]> sourceware.org Git - glibc.git/commitdiff
hurd: Fix adjtime call with OLDDELTA == NULL
authorSvante Signell <svante.signell@gmail.com>
Tue, 30 Aug 2016 21:06:31 +0000 (23:06 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 30 Aug 2016 21:07:30 +0000 (23:07 +0200)
* sysdeps/mach/hurd/adjtime.c (__adjtime): When OLDDELTA is NULL, make
it point to a dumb buffer for RPC to fill it.

ChangeLog
sysdeps/mach/hurd/adjtime.c

index 418bdae9b4c1f78aa15f7ec4a9c2105e0eaec065..d24536ba9ca625b3caac7450a9a23daf7075619b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-08-30  Svante Signell  <svante.signell@gmail.com>
+
+       * 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  <siddhesh@sourceware.org>
 
        * sysdeps/ieee754/dbl-64/s_sin.c (do_cos_slow): Use ternary
index d65b95b9c66505614b8d78149349b23ce679ca95..7cfdd53e82337f3918a9ed7f08c9a21b8ff837ac 100644 (file)
@@ -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.  */
This page took 0.166245 seconds and 5 git commands to generate.