Date: Mon, 3 Jul 2017 20:46:10 +0200 From: Kurt Jaeger <lists@opsec.eu> To: Chris Ross <cross+freebsd@distal.com> Cc: freebsd-stable@freebsd.org Subject: Re: Compile-time check for clock_nanosleep() Message-ID: <20170703184610.GH65214@home.opsec.eu> In-Reply-To: <BC299EA0-EFE3-4F44-BBED-8D0D18C632D4@distal.com> References: <BC299EA0-EFE3-4F44-BBED-8D0D18C632D4@distal.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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@opsec.eu +49 171 3101372 3 years to go !
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170703184610.GH65214>