summaryrefslogtreecommitdiffstats
path: root/rtemsbsd
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 /rtemsbsd
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 'rtemsbsd')
-rw-r--r--rtemsbsd/powerpc/include/linux/time.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/rtemsbsd/powerpc/include/linux/time.h b/rtemsbsd/powerpc/include/linux/time.h
index 27516a4c..442d3bfc 100644
--- a/rtemsbsd/powerpc/include/linux/time.h
+++ b/rtemsbsd/powerpc/include/linux/time.h
@@ -70,9 +70,7 @@ timespec_sub(struct timespec lhs, struct timespec rhs)
{
struct timespec ts;
- ts.tv_sec = lhs.tv_sec;
- ts.tv_nsec = lhs.tv_nsec;
- timespecsub(&ts, &rhs);
+ timespecsub(&lhs, &rhs, &ts);
return ts;
}