perfsonar / owamp

A tool for performing one-way or two-way active measurements
Apache License 2.0
70 stars 30 forks source link

Fix the build on systems that define a 3-argument timespecadd #35

Closed asomers closed 5 years ago

asomers commented 6 years ago

owamp defines a private 2-argument timespecadd macro that's a copy of the FreeBSD kernel's. But NetBSD, OpenBSD, and FreeDesktop.org's libbsd all define a public 3-argument timespecadd macro instead. Also, an upcoming change to FreeBSD will replace the 2-argument version with the more common 3-argument version and make it public.

This change fixes the build of owamp on such systems by assuming nothing about what timespecadd macro might be defined by the system, and always using the local definition.

mfeit-internet2 commented 6 years ago

Has this fix been tested on a Linux system to make sure it doesn't break that version?

asomers commented 6 years ago

No.

vvidic commented 6 years ago

Build works on Linux. AFAICT the defines where already used on Linux so the patch should not change anything there.

mfeit-internet2 commented 6 years ago

@vvidic Thanks. Just didn't want to pull the change without someone having tried it on the platform where it gets used most.