summaryrefslogtreecommitdiff
path: root/usr.sbin/camdd
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 /usr.sbin/camdd
parent19fe43f796f3d962b3bf023a4484a82d7b2a5711 (diff)
downloadsrc-test2-6040822c4e20fb46638ecaaad543fc56f6ec2b0f.tar.gz
src-test2-6040822c4e20fb46638ecaaad543fc56f6ec2b0f.zip
Notes
Diffstat (limited to 'usr.sbin/camdd')
-rw-r--r--usr.sbin/camdd/camdd.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/usr.sbin/camdd/camdd.c b/usr.sbin/camdd/camdd.c
index 040920ad9562..1133c6c182aa 100644
--- a/usr.sbin/camdd/camdd.c
+++ b/usr.sbin/camdd/camdd.c
@@ -429,23 +429,6 @@ static sig_atomic_t need_status = 0;
#define min(a, b) (a < b) ? a : b
#endif
-/*
- * XXX KDM private copy of timespecsub(). This is normally defined in
- * sys/time.h, but is only enabled in the kernel. If that definition is
- * enabled in userland, it breaks the build of libnetbsd.
- */
-#ifndef timespecsub
-#define timespecsub(vvp, uvp) \
- do { \
- (vvp)->tv_sec -= (uvp)->tv_sec; \
- (vvp)->tv_nsec -= (uvp)->tv_nsec; \
- if ((vvp)->tv_nsec < 0) { \
- (vvp)->tv_sec--; \
- (vvp)->tv_nsec += 1000000000; \
- } \
- } while (0)
-#endif
-
/* Generically useful offsets into the peripheral private area */
#define ppriv_ptr0 periph_priv.entries[0].ptr
@@ -3069,7 +3052,7 @@ camdd_print_status(struct camdd_dev *camdd_dev, struct camdd_dev *other_dev,
return;
}
- timespecsub(&done_time, start_time);
+ timespecsub(&done_time, start_time, &done_time);
total_ns = done_time.tv_nsec + (done_time.tv_sec * 1000000000);
total_sec = total_ns;