How to know __FreeBSD_version for a symbol

mdf at FreeBSD.org mdf at FreeBSD.org
Mon Aug 13 14:14:41 UTC 2012


On Mon, Aug 13, 2012 at 1:24 AM, Hooman Fazaeli <hoomanfazaeli at gmail.com> wrote:
> Hi hackers
>
> In the process of back porting drivers to older freebsd versions,
> We sometimes need to add suitable '#if __FreeBSD_version >= xxxxx ... else
> ... '
> directives to the source to use an alternate function or exclude certain
> statements, defines, etc.
>
> What is the best (quick/reliable) way to know in which __FreeBSD_version
> a symbol (function, struct member, macro, ...) has been first introduced?

As far as I know it's a slightly painful look over SVN logs.  First,
find the SVN revision that introduced or changed the relevant symbol.
Then, look at the SVN history of sys/sys/param.h for changes to
__FreeBSD_version symbol.  The one that's from the same or later SVN
revision as the symbol change is the value you'll need.

Cheers,
matthew


More information about the freebsd-hackers mailing list