Re: Getting __FreeBSD_version for a specific commit

From: Konstantin Belousov <kostikbel_at_gmail.com>
Date: Mon, 27 Mar 2023 13:23:53 UTC
On Mon, Mar 27, 2023 at 01:29:17PM +0200, Dimitry Andric wrote:
> On 27 Mar 2023, at 13:14, Nuno Teixeira <eduardo@freebsd.org> wrote:
> > 
> > I need to know what's the __FreeBSD_version for a stable/13 commit https://cgit.freebsd.org/src/commit/?h=stable/13&id=1dd126163b9448c2dcfe27978fee50649548437c so I can patch a port for, e.g, OSVERSION < 1301XXX.
> 
> Go to:
> 
> https://cgit.freebsd.org/src/tree/sys/sys/param.h?h=stable/13&id=1dd126163b9448c2dcfe27978fee50649548437c
> 
> and look for the "#define __FreeBSD_version" line. In this case, it has value 1301511.

Why not check the presence of the header directly?