From: GNU Libc Maintainers Date: Sun, 4 Dec 2016 21:49:53 +0000 (+0000) Subject: cvs-adjtime-NULL X-Git-Tag: archive/raspbian/2.25-3+rpi1~1^2^2^2^2^2^2^2^2~75 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ae87f5190d8e46f46810697a81a18b9d1fda16c5;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. */