3e109d2cd3
-stable machine via the old-school methods): Use __FreeBSD_version in preference to __FreeBSD__ >= N where possible. Define a single variable mythread which is set to curproc or curthread depending on the OS version (with a comment saying it is a white lie on 4.x since it really is a proc). NB: __FreeBSD__ is the OS level of the host machine, not the target, and should never be used, if possible, as __FreeBSD__ >= N.