aboutsummaryrefslogtreecommitdiff
path: root/net/owamp
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2018-07-26 18:17:30 +0000
committerKurt Jaeger <pi@FreeBSD.org>2018-07-26 18:17:30 +0000
commite011e2dcbbfd3ac7ce2fa3ec1a62be65d0b505cf (patch)
tree8fe1573fd77763b5628f5f2f3890231c6f7961da /net/owamp
parent580db765b242a6607e90fa0300b595be345985ce (diff)
downloadports-e011e2dcbbfd3ac7ce2fa3ec1a62be65d0b505cf.tar.gz
ports-e011e2dcbbfd3ac7ce2fa3ec1a62be65d0b505cf.zip
net/owamp: Unconditionally define a private timespecadd
net/owamp assumes that if timespecadd is defined, it's identical to the two-argument version found in the FreeBSD kernel. However, the three argument version found in NetBSD and OpenBSD is actually more common. An upcoming commit to head will replace FreeBSD's version with the NetBSD version. So net/owamp shouldn't assume that if FreeBSD defines timespecadd, it's defining the 2-argument version. PR: 230059 Submitted by: asomers
Notes
Notes: svn path=/head/; revision=475393
Diffstat (limited to 'net/owamp')
-rw-r--r--net/owamp/files/patch-owamp_owamp.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/net/owamp/files/patch-owamp_owamp.h b/net/owamp/files/patch-owamp_owamp.h
new file mode 100644
index 000000000000..f7bc9cd94af3
--- /dev/null
+++ b/net/owamp/files/patch-owamp_owamp.h
@@ -0,0 +1,49 @@
+--- owamp/owamp.h.orig 2012-03-27 02:23:05 UTC
++++ owamp/owamp.h
+@@ -1635,14 +1635,13 @@ OWPTestDiskspace(
+ #define timespecisset(tvp) ((tvp)->tv_sec || (tvp)->tv_nsec)
+ #endif
+
+-#ifndef timespeccmp
++#undef timespeccmp
+ #define timespeccmp(tvp, uvp, cmp) \
+ (((tvp)->tv_sec == (uvp)->tv_sec) ? \
+ ((tvp)->tv_nsec cmp (uvp)->tv_nsec) : \
+ ((tvp)->tv_sec cmp (uvp)->tv_sec))
+-#endif
+
+-#ifndef timespecadd
++#undef timespecadd
+ #define timespecadd(vvp, uvp) \
+ do { \
+ (vvp)->tv_sec += (uvp)->tv_sec; \
+@@ -1652,9 +1651,8 @@ OWPTestDiskspace(
+ (vvp)->tv_nsec -= 1000000000; \
+ } \
+ } while (0)
+-#endif
+
+-#ifndef timespecsub
++#undef timespecsub
+ #define timespecsub(vvp, uvp) \
+ do { \
+ (vvp)->tv_sec -= (uvp)->tv_sec; \
+@@ -1664,9 +1662,8 @@ OWPTestDiskspace(
+ (vvp)->tv_nsec += 1000000000; \
+ } \
+ } while (0)
+-#endif
+
+-#ifndef timespecdiff
++#undef timespecdiff
+ #define timespecdiff(vvp,uvp) \
+ do { \
+ struct timespec ts1_,ts2_; \
+@@ -1680,7 +1677,6 @@ OWPTestDiskspace(
+ timespecsub(&ts1_,&ts2_); \
+ *vvp = ts1_; \
+ } while(0)
+-#endif
+
+ extern OWPNum64
+ OWPGetRTTBound(