Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Mar 2023 18:14:46 +0100
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Robert Nagy <rnagy@FreeBSD.org>
Cc:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   Re: git: bf4345746390 - main - www/*chromium: add missing osreldate.h header tighten the version check
Message-ID:  <k000-8kc9-wny@FreeBSD.org>
In-Reply-To: <202303011311.321DBwbt069432@gitrepo.freebsd.org> (Robert Nagy's message of "Wed, 1 Mar 2023 13:11:58 GMT")
References:  <202303011311.321DBwbt069432@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Nagy <rnagy@FreeBSD.org> writes:

> -+#if __FreeBSD__version > 1300000
> - #define HAVE_MEMFD_CREATE
> -+#else
> ++#if defined(__FreeBSD__)
> ++#include <osreldate.h>
> ++#if defined(__FreeBSD_version) && __FreeBSD_version < 1300048
>  +#undef HAVE_MEMFD_CREATE
> ++#else
> + #define HAVE_MEMFD_CREATE
> ++#endif
>  +#endif

A more simple way is to check __FreeBSD__ value. ports/ tree doesn't
support EOL -RELEASEs, let alone old -CURRENT snapshots.

$ git -C /usr/src show release/13.0.0:sys/sys/param.h | grep '#define.*_version'
#define __FreeBSD_version 1300139       /* Master, propagated to newvers */

#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 13)
#define HAVE_MEMFD_CREATE
#else
#undef HAVE_MEMFD_CREATE
#endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?k000-8kc9-wny>