From ae87f5190d8e46f46810697a81a18b9d1fda16c5 Mon Sep 17 00:00:00 2001 From: GNU Libc Maintainers Date: Sun, 4 Dec 2016 21:49:53 +0000 Subject: [PATCH] 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 --- sysdeps/mach/hurd/adjtime.c | 4 ++++ 1 file changed, 4 insertions(+) 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. */ -- 2.30.2