[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RFC: [PATCH] Enable olddelta to be NULL in adjtime(3)

From: Svante Signell
Subject: RFC: [PATCH] Enable olddelta to be NULL in adjtime(3)
Date: Tue, 30 Aug 2016 14:32:32 +0200


Attached are two small patches to enable the third argument of adjtime() to be
NULL, see adjtime(3). Calling __host_adjust_time() with a third argument being
NULL, causes a segfault due to the *old_adjustment = OutP->old_adjustment
statement in RPC_host_adjust_time.c.

The glibc patch sysdeps_mach_hurd_adjtime.c.diff use a dummy struct timeval to
avoid calling ___host_adjust_time() in _adjtime() with a NULL third argument.
Smarter solutions can probably be found, comments are welcome.

The gnumach patch, 80_mach_clock.patch sets the old_adjustment to oadj only if
old_adjustment is non-null. This patch is probably redundant but included here

TODO: EINVAL should also be returned if the supplied delta is too large, as
described in adjtime(3). This would be easy to fix, by a slight modification of
adjtime.c and/or mach_clock.c.


Attachment: 80_mach_clock.patch
Description: Text Data

Attachment: sysdeps_mach_hurd_adjtime.c.diff
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]