Re: How to Check kernel version in code?
On Tue, 3 Jun 2014, Sreenivasa Honnur wrote:
> I want to enable some code based on FBSD kernel versions like below:
>
> #ifdef FreeBSD_VERSION_10
>
> #endif
>
> #ifdef FreeBSD_VERSION_9.2
>
> #endif
>
>
> How can I do achieve this?
__FreeBSD_version is defined in sys/param.h, and is incremented for major
version changes as well as other events of note.
Increments are tabulated at
http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html
-Ben Kaduk
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
討論串 (同標題文章)
完整討論串 (本文為第 2 之 3 篇):