Fix errno on DragonFly
__dfly_error() was removed from Rust many years ago.
DragonFly uses a thread-local errno variable, but #[thread_local] is feature-gated and not available in stable Rust as of this writing (Rust 1.31.0). We have to use a C extension to access it.
Tracking issue for thread_local
stabilization:
https://github.com/rust-lang/rust/issues/29594
Once this becomes stable, we can simply use:
extern { #[thread_local] static errno: c_int; }