Fixing Rust on DragonFly again

In order to build the most recent version of the Rust compiler on DragonFly BSD again, I had to come up with the following two pull requests: libc PR #464 and rust PR #38197.

The first patch fixes rust-lang/libc, the pure-Rust libc equivalent.

The second patch is a follow up on an old patch I submitted a few month ago and fixes the way Rust determines the filename of the currently executing binary.