From: GNU Libc Maintainers Date: Sun, 28 May 2017 17:29:33 +0000 (+0000) Subject: cvs-adjtime-NULL X-Git-Tag: archive/raspbian/2.25-3+rpi1~1^2^2^2^2^2~81 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=388b35a48923cfafe5730fbd63985a65c499a5ce;p=glibc.git cvs-adjtime-NULL commit aaf30454802855d439f3d4d1a12fd6b905621029 Author: Svante Signell Date: Tue Aug 30 23:06:31 2016 +0200 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. Gbp-Pq: Topic hurd-i386 Gbp-Pq: Name cvs-adjtime-NULL.diff --- diff --git a/sysdeps/mach/hurd/adjtime.c b/sysdeps/mach/hurd/adjtime.c index d65b95b9c..7cfdd53e8 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. */