Date: Thu, 26 Jul 2018 18:17:30 +0000 (UTC) From: Kurt Jaeger <pi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r475393 - head/net/owamp/files Message-ID: <201807261817.w6QIHUX0070694@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pi Date: Thu Jul 26 18:17:30 2018 New Revision: 475393 URL: https://svnweb.freebsd.org/changeset/ports/475393 Log: 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 Added: head/net/owamp/files/ head/net/owamp/files/patch-owamp_owamp.h (contents, props changed) Added: head/net/owamp/files/patch-owamp_owamp.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/owamp/files/patch-owamp_owamp.h Thu Jul 26 18:17:30 2018 (r475393) @@ -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(
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807261817.w6QIHUX0070694>