Compile-time check for clock_nanosleep()
Kurt Jaeger
lists at opsec.eu
Mon Jul 3 18:46:08 UTC 2017
Hi!
> Some time ago, I ported a linux program that was using clock_nanosleep().
> I see now that the extra code I'd put in isn't needed anymore in 11-stable,
> as it appears this call was added in 11.1. My question is, to
> properly protect these changes, what is the best way to know at
> compile time, either (a) that that call is in libc, or (b) that
> I'm compiling on FreeBSD 11.1 or later ?
Use __FreeBSD_version from sys/param.h:
https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/versions.html
--
pi at opsec.eu +49 171 3101372 3 years to go !
More information about the freebsd-stable
mailing list