aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/efidev
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2018-07-30 15:46:40 +0000
committerAlan Somers <asomers@FreeBSD.org>2018-07-30 15:46:40 +0000
commit6040822c4e20fb46638ecaaad543fc56f6ec2b0f (patch)
tree133352663bf8c98c65abf581f6a4a8769325ca09 /sys/dev/efidev
parent19fe43f796f3d962b3bf023a4484a82d7b2a5711 (diff)
downloadsrc-6040822c4e20fb46638ecaaad543fc56f6ec2b0f.tar.gz
src-6040822c4e20fb46638ecaaad543fc56f6ec2b0f.zip
Make timespecadd(3) and friends public
The timespecadd(3) family of macros were imported from NetBSD back in r35029. However, they were initially guarded by #ifdef _KERNEL. In the meantime, we have grown at least 28 syscalls that use timespecs in some way, leading many programs both inside and outside of the base system to redefine those macros. It's better just to make the definitions public. Our kernel currently defines two-argument versions of timespecadd and timespecsub. NetBSD, OpenBSD, and FreeDesktop.org's libbsd, however, define three-argument versions. Solaris also defines a three-argument version, but only in its kernel. This revision changes our definition to match the common three-argument version. Bump _FreeBSD_version due to the breaking KPI change. Discussed with: cem, jilles, ian, bde Differential Revision: https://reviews.freebsd.org/D14725
Notes
Notes: svn path=/head/; revision=336914
Diffstat (limited to 'sys/dev/efidev')
-rw-r--r--sys/dev/efidev/efirtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/efidev/efirtc.c b/sys/dev/efidev/efirtc.c
index 1e5784b19263..b9e06bcc362e 100644
--- a/sys/dev/efidev/efirtc.c
+++ b/sys/dev/efidev/efirtc.c
@@ -163,7 +163,7 @@ efirtc_settime(device_t dev, struct timespec *ts)
*/
ts->tv_sec -= utc_offset();
if (!efirtc_zeroes_subseconds)
- timespecadd(ts, &efirtc_resadj);
+ timespecadd(ts, &efirtc_resadj, ts);
clock_ts_to_ct(ts, &ct);
clock_dbgprint_ct(dev, CLOCK_DBG_WRITE, &ct);