Follow r257244; it's now necessary to include if_var.h.
Remove redundand assignment to error variable and check for its value [1].
Do CTR logging in the case of error as well.

Noted by:	rdivacky [1]
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
Enable the --sysroot=/foo option in ld by always building with a sysroot
defined. When not building as a cross linker, the sysroot is set to "/".

Exp-run by:	bdrewery (ports/183206)
MFC after:	3 days
Add a couple includes if net/if_var.h that were missed in r257176.
[automated] Merge in upstream-github/master