summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/opencrypto
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-24 08:55:00 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-24 08:57:10 +0200
commit12a885cd18f9d80a3019d152c042b2d80d5bb207 (patch)
tree63607cf623a28ba7fe5715ad68cf09f5629c2c15 /freebsd/sys/opencrypto
parenttests/termios: Fix warnings (diff)
downloadrtems-libbsd-12a885cd18f9d80a3019d152c042b2d80d5bb207.tar.bz2
Update due to <sys/time.h> API changes
Changes correspond to FreeBSD commit: "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" Update #3472.
Diffstat (limited to 'freebsd/sys/opencrypto')
-rw-r--r--freebsd/sys/opencrypto/crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/freebsd/sys/opencrypto/crypto.c b/freebsd/sys/opencrypto/crypto.c
index 45622c39..c1132ff3 100644
--- a/freebsd/sys/opencrypto/crypto.c
+++ b/freebsd/sys/opencrypto/crypto.c
@@ -1031,7 +1031,7 @@ crypto_tstat(struct cryptotstat *ts, struct bintime *bt)
if (u < delta.frac)
delta.sec--;
bintime2timespec(&delta, &t);
- timespecadd(&ts->acc, &t);
+ timespecadd(&ts->acc, &t, &ts->acc);
if (timespeccmp(&t, &ts->min, <))
ts->min = t;
if (timespeccmp(&t, &ts->max, >))